parser 2.2.3.0 → 2.3.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b4e8532831b7b8c5cdee3863cc51bc13f277769
4
- data.tar.gz: 6adce23f788de811483302c079f20afac98fe4d1
3
+ metadata.gz: 7905cd349ed05fe7863ce5aaa663b8bd8fa25540
4
+ data.tar.gz: 38a63649de5e2c92c4b7cf914fd6ec61ea45215f
5
5
  SHA512:
6
- metadata.gz: 9e5a9bb0f531b580293ca749ac22844640eb91aab7dab6c62a12cd1f94218ca03c0b7c8273ea786d70e66e57e0c1ed502af5ba6c8bd3b0ed3ff6fecdc54a9003
7
- data.tar.gz: d83c6c75a653998e7f0ca8fe180d1361bd81859be78a43ee050d28f5ab8ec8457eef525a6f297f373b7ac39cf4d21aed4edcbc973ae6fe913058e41e503d1d2d
6
+ metadata.gz: c84415fe3e6169d8ae2b354fe353dc2533a0abe135710c7031073ba115b750e3037365da5c6cde0a8d3fee8f27844db7f85789cdd896052af740a5e80decc97a
7
+ data.tar.gz: 798bbc468a23a191e472c98d921645cfa2dce4a174a5a22ea107e89d68a28943fd27907fcabfb199752c9b2224dee2b35ad2bbaf708984881d3c7516e7f2ecaf
@@ -1,25 +1,6 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- v2.2.3.0 (2015-10-08)
5
- ---------------------
6
-
7
- Bugs fixed:
8
- * lexer.rl: "-> a: {}": state after -> is ENDFN, not END (fixes #203). (whitequark)
9
- * ruby{21,22}.y: "p -> { :hello }, a: 1 do end": lexpop cmdarg. (whitequark)
10
-
11
- v2.2.2.6 (2015-06-30)
12
- ---------------------
13
-
14
- API modifications:
15
- * parser/current: link to README from syntax deviation warning. (whitequark)
16
-
17
- v2.3.0.pre.2 (2015-06-15)
18
- -------------------------
19
-
20
- Bugs fixed:
21
- * {macruby,rubymotion}.rb: add to gemspec. (whitequark)
22
-
23
4
  v2.3.0.pre.1 (2015-06-13)
24
5
  -------------------------
25
6
 
@@ -3,7 +3,6 @@ module Parser
3
3
  def warn_syntax_deviation(feature, version)
4
4
  warn "warning: parser/current is loading #{feature}, which recognizes"
5
5
  warn "warning: #{version}-compliant syntax, but you are running #{RUBY_VERSION}."
6
- warn "warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri."
7
6
  end
8
7
  private :warn_syntax_deviation
9
8
  end
@@ -1891,7 +1891,7 @@ class Parser::Lexer
1891
1891
  emit_table(PUNCTUATION, @ts, @ts + 2)
1892
1892
 
1893
1893
  @lambda_stack.push @paren_nest
1894
- fnext expr_endfn; fbreak;
1894
+ fbreak;
1895
1895
  };
1896
1896
 
1897
1897
  e_lbrace | 'do'
@@ -1470,7 +1470,6 @@ opt_block_args_tail:
1470
1470
  lambda_body
1471
1471
  {
1472
1472
  @lexer.cmdarg = val[2]
1473
- @lexer.cmdarg.lexpop
1474
1473
 
1475
1474
  result = [ val[1], val[3] ]
1476
1475
 
@@ -1479,7 +1479,6 @@ opt_block_args_tail:
1479
1479
  lambda_body
1480
1480
  {
1481
1481
  @lexer.cmdarg = val[2]
1482
- @lexer.cmdarg.lexpop
1483
1482
 
1484
1483
  result = [ val[1], val[3] ]
1485
1484
 
@@ -40,8 +40,6 @@ module Parser
40
40
  )
41
41
  /x
42
42
 
43
- NEW_LINE = "\n".freeze
44
-
45
43
  ##
46
44
  # Try to recognize encoding of `string` as Ruby would, i.e. by looking for
47
45
  # magic encoding comment or UTF-8 BOM. `string` can be in any encoding.
@@ -175,7 +173,7 @@ module Parser
175
173
  raise ArgumentError, 'Source::Buffer is immutable'
176
174
  end
177
175
 
178
- @source = input.gsub("\r\n", NEW_LINE).freeze
176
+ @source = input.gsub("\r\n", "\n").freeze
179
177
  end
180
178
 
181
179
  ##
@@ -200,7 +198,7 @@ module Parser
200
198
  def source_line(lineno)
201
199
  unless @lines
202
200
  @lines = @source.lines.to_a
203
- @lines.each { |line| line.chomp!(NEW_LINE) }
201
+ @lines.each { |line| line.chomp!("\n") }
204
202
 
205
203
  # If a file ends with a newline, the EOF token will appear
206
204
  # to be one line further than the end of file.
@@ -217,7 +215,7 @@ module Parser
217
215
  @line_begins, index = [ [ 0, 0 ] ], 1
218
216
 
219
217
  @source.each_char do |char|
220
- if char == NEW_LINE
218
+ if char == "\n"
221
219
  @line_begins.unshift [ @line_begins.length, index ]
222
220
  end
223
221
 
@@ -1,3 +1,3 @@
1
1
  module Parser
2
- VERSION = '2.2.3.0'
2
+ VERSION = '2.3.0.pre.1'
3
3
  end
@@ -5,7 +5,7 @@ require File.expand_path('../lib/parser/version', __FILE__)
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'parser'
7
7
  spec.version = Parser::VERSION
8
- spec.authors = ['whitequark']
8
+ spec.authors = ['Peter Zotov']
9
9
  spec.email = ['whitequark@whitequark.org']
10
10
  spec.description = 'A Ruby parser written in pure Ruby.'
11
11
  spec.summary = spec.description
@@ -20,8 +20,6 @@ Gem::Specification.new do |spec|
20
20
  lib/parser/ruby20.rb
21
21
  lib/parser/ruby21.rb
22
22
  lib/parser/ruby22.rb
23
- lib/parser/macruby.rb
24
- lib/parser/rubymotion.rb
25
23
  )
26
24
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
25
  spec.test_files = spec.files.grep(%r{^test/})
@@ -3175,26 +3175,6 @@ class TestParser < Minitest::Test
3175
3175
  ALL_VERSIONS - %w(1.8))
3176
3176
  end
3177
3177
 
3178
- def test_send_lambda_args_noparen
3179
- assert_parses(
3180
- s(:block, s(:send, nil, :lambda),
3181
- s(:args,
3182
- s(:kwoptarg, :a, s(:int, 1))),
3183
- nil),
3184
- %q{-> a: 1 { }},
3185
- %q{},
3186
- ALL_VERSIONS - %w(1.8 1.9 mac ios))
3187
-
3188
- assert_parses(
3189
- s(:block, s(:send, nil, :lambda),
3190
- s(:args,
3191
- s(:kwarg, :a)),
3192
- nil),
3193
- %q{-> a: { }},
3194
- %q{},
3195
- ALL_VERSIONS - %w(1.8 1.9 mac ios 2.0))
3196
- end
3197
-
3198
3178
  def test_send_call
3199
3179
  assert_parses(
3200
3180
  s(:send, s(:lvar, :foo), :call,
@@ -5024,24 +5004,7 @@ class TestParser < Minitest::Test
5024
5004
  s(:block, s(:send, nil, :a), s(:args), nil))),
5025
5005
  %q{p ->() do a() do end end},
5026
5006
  %q{},
5027
- ALL_VERSIONS - %w(1.8 1.9 mac ios 2.0)) # no 1.9 backport
5028
- end
5029
-
5030
- def test_ruby_bug_11380
5031
- assert_parses(
5032
- s(:block,
5033
- s(:send, nil, :p,
5034
- s(:block,
5035
- s(:send, nil, :lambda),
5036
- s(:args),
5037
- s(:sym, :hello)),
5038
- s(:hash,
5039
- s(:pair, s(:sym, :a), s(:int, 1)))),
5040
- s(:args),
5041
- nil),
5042
- %q{p -> { :hello }, a: 1 do end},
5043
- %q{},
5044
- ALL_VERSIONS - %w(1.8 1.9 mac ios 2.0)) # no 1.9 backport
5007
+ ALL_VERSIONS - %w(1.8 1.9 mac ios 2.0)) # no 1.9 mac ios backport
5045
5008
  end
5046
5009
 
5047
5010
  def test_parser_bug_198
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3.0
4
+ version: 2.3.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
- - whitequark
7
+ - Peter Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-08 00:00:00.000000000 Z
11
+ date: 2015-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
@@ -269,7 +269,6 @@ files:
269
269
  - lib/parser/lexer/explanation.rb
270
270
  - lib/parser/lexer/literal.rb
271
271
  - lib/parser/lexer/stack_state.rb
272
- - lib/parser/macruby.rb
273
272
  - lib/parser/macruby.y
274
273
  - lib/parser/messages.rb
275
274
  - lib/parser/meta.rb
@@ -284,7 +283,6 @@ files:
284
283
  - lib/parser/ruby21.y
285
284
  - lib/parser/ruby22.rb
286
285
  - lib/parser/ruby22.y
287
- - lib/parser/rubymotion.rb
288
286
  - lib/parser/rubymotion.y
289
287
  - lib/parser/runner.rb
290
288
  - lib/parser/runner/ruby_parse.rb
@@ -352,9 +350,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
352
350
  version: '0'
353
351
  required_rubygems_version: !ruby/object:Gem::Requirement
354
352
  requirements:
355
- - - ">="
353
+ - - ">"
356
354
  - !ruby/object:Gem::Version
357
- version: '0'
355
+ version: 1.3.1
358
356
  requirements: []
359
357
  rubyforge_project:
360
358
  rubygems_version: 2.4.1