parser 2.1.2 → 2.1.3

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: af4585f0f54966cb0ea90fc757545580f56cc42f
4
- data.tar.gz: bc60ac2087e03379fc3932f13ba81823d59f555b
3
+ metadata.gz: 148d839922a9bdca3cd052f7646a9b43f97140ed
4
+ data.tar.gz: 13b1c9a5a46316f06edc3f07d4563208f85061a8
5
5
  SHA512:
6
- metadata.gz: adc95d57bebd0e1cfaa53f08d13aec17cf3d86866cc257f43814204a41c1f1d0ba686dc0a6f367fc7e3f57235201e2c46a02714149e26d393a85bc5edf80395b
7
- data.tar.gz: e54e2aa83194bc33d6d2f10ef1a7fd033902b34b0d91018e6d2227887cda5b4e7f38020f43235bc69e154d06948822ce0bcc3507b275b81059db3aa7c70210e1
6
+ metadata.gz: db8f7961c0c94569a47962c6d486697de06d53d465bdea091ce5d16d88beafb708c27fa50b6c201770ab1812302a1c0fc6940e7324dbb2ec9b716d362e2515e3
7
+ data.tar.gz: 1ad1bb8462155a066adf2986d2ac21c78e41c7c588ff00c982968f328ce98b32f8bac7d6bc2b78583010de6575d05f81b5da0c711ba3a08dc1ae7e52b52ab9a8
data/.travis.yml CHANGED
@@ -12,3 +12,5 @@ before_install:
12
12
  - bundle --version
13
13
  - gem update --system 2.1.11
14
14
  - gem --version
15
+ script:
16
+ - bundle exec rake test_cov
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v2.1.3 (2014-01-10)
5
+ -------------------
6
+
7
+ Bugs fixed:
8
+ * lexer.rl: "/\//": don't include escaped delimiter in AST in its escaped form (fixes #125). (Peter Zotov)
9
+ * Builders::Default: "return x y do end": correctly build AST for keywords followed by command (closes #129). (Peter Zotov)
10
+ * Fix a bug where "ambiguous first argument" diagnostic was not emitted (Yuji Nakayama)
11
+ * Source::Comment::Associator: don't die while associating with "__ENCODING__". (Peter Zotov)
12
+ * ruby-parse: don't die when invoked with -L -e "__ENCODING__". (Peter Zotov)
13
+ * Add missing source map for match-current-line (Yuji Nakayama)
14
+
4
15
  v2.1.2 (2014-01-05)
5
16
  -------------------
6
17
 
data/Rakefile CHANGED
@@ -11,6 +11,11 @@ Rake::TestTask.new do |t|
11
11
  t.test_files = FileList["test/**/test_*.rb"]
12
12
  end
13
13
 
14
+ task :test_cov do
15
+ ENV['COVERAGE'] = '1'
16
+ Rake::Task['test'].invoke
17
+ end
18
+
14
19
  task :build => [:generate_release, :changelog]
15
20
 
16
21
  GENERATED_FILES = %w(lib/parser/lexer.rb
@@ -65,7 +70,7 @@ task :changelog do
65
70
  end
66
71
  end
67
72
 
68
- IO.popen("git log --pretty='#{format}' 2.0 master", 'r') do |io|
73
+ IO.popen("git log --pretty='#{format}' 2.0 2.1 master", 'r') do |io|
69
74
  current_version = nil
70
75
 
71
76
  io.each_line do |line|
data/doc/AST_FORMAT.md CHANGED
@@ -1531,6 +1531,7 @@ Format:
1531
1531
  ~~~
1532
1532
  (match-current-line (regexp (str "a") (regopt)))
1533
1533
  "if /a/; end"
1534
+ ~~~ expression
1534
1535
  ~~~
1535
1536
 
1536
1537
  ### Local variable injecting matches
@@ -625,14 +625,30 @@ module Parser
625
625
 
626
626
  def block(method_call, begin_t, args, body, end_t)
627
627
  _receiver, _selector, *call_args = *method_call
628
- last_arg = call_args.last
629
628
 
629
+ if method_call.type == :yield
630
+ diagnostic :error, :block_given_to_yield, nil, method_call.loc.keyword, [loc(begin_t)]
631
+ end
632
+
633
+ last_arg = call_args.last
630
634
  if last_arg && last_arg.type == :block_pass
631
- diagnostic :error, :block_and_blockarg, nil, last_arg.loc.expression
635
+ diagnostic :error, :block_and_blockarg, nil, last_arg.loc.expression, [loc(begin_t)]
632
636
  end
633
637
 
634
- n(:block, [ method_call, args, body ],
635
- block_map(method_call.loc.expression, begin_t, end_t))
638
+ if method_call.type == :send
639
+ n(:block, [ method_call, args, body ],
640
+ block_map(method_call.loc.expression, begin_t, end_t))
641
+ else
642
+ # Code like "return foo 1 do end" is reduced in a weird sequence.
643
+ # Here, method_call is actually (return).
644
+ actual_send, = *method_call
645
+ block =
646
+ n(:block, [ actual_send, args, body ],
647
+ block_map(actual_send.loc.expression, begin_t, end_t))
648
+
649
+ n(method_call.type, [ block ],
650
+ method_call.loc.with_expression(join_exprs(method_call, block)))
651
+ end
636
652
  end
637
653
 
638
654
  def block_pass(amper_t, arg)
@@ -816,6 +832,13 @@ module Parser
816
832
  # Keywords
817
833
 
818
834
  def keyword_cmd(type, keyword_t, lparen_t=nil, args=[], rparen_t=nil)
835
+ if type == :yield && args.count > 0
836
+ last_arg = args.last
837
+ if last_arg.type == :block_pass
838
+ diagnostic :error, :block_given_to_yield, nil, loc(keyword_t), [last_arg.loc.expression]
839
+ end
840
+ end
841
+
819
842
  n(type, args,
820
843
  keyword_map(keyword_t, lparen_t, args, rparen_t))
821
844
  end
@@ -958,7 +981,7 @@ module Parser
958
981
  end
959
982
 
960
983
  when :regexp
961
- n(:match_current_line, [ cond ], nil)
984
+ n(:match_current_line, [ cond ], expr_map(cond.loc.expression))
962
985
 
963
986
  else
964
987
  cond
data/lib/parser/lexer.rl CHANGED
@@ -823,9 +823,9 @@ class Parser::Lexer
823
823
  # or closing delimiter, it is an escape sequence for that
824
824
  # particular character. Write it without the backslash.
825
825
 
826
- if literal.regexp?
827
- # Regular expressions should have every escape sequence in its
828
- # raw form.
826
+ if literal.regexp? && escaped_char == '\\'
827
+ # Regular expressions should include backslashes in their escaped
828
+ # form.
829
829
  literal.extend_string(tok, @ts, @te)
830
830
  else
831
831
  literal.extend_string(escaped_char, @ts, @te)
@@ -844,7 +844,8 @@ class Parser::Lexer
844
844
  @escape.call if @escape.respond_to? :call
845
845
 
846
846
  if literal.regexp?
847
- # Ditto. Also, expand escaped newlines.
847
+ # Regular expressions should include escape sequences in their
848
+ # escaped form. On the other hand, escaped newlines are removed.
848
849
  literal.extend_string(tok.gsub("\\\n", ''), @ts, @te)
849
850
  else
850
851
  literal.extend_string(@escape || tok, @ts, @te)
@@ -1357,21 +1358,21 @@ class Parser::Lexer
1357
1358
  w_space* '?'
1358
1359
  => { fhold; fgoto expr_beg; };
1359
1360
 
1360
- # a %{1}, a %[1] (but not "a %=1=" or "a % foo")
1361
- # a /foo/ (but not "a / foo" or "a /=foo")
1362
- w_space+ ( [%/] ( c_any - c_space_nl - '=' ) # /
1363
- # a <<HEREDOC
1364
- | '<<'
1365
- )
1366
- => { fhold; fhold; fgoto expr_beg; };
1367
-
1368
- # x /1
1369
- # Ambiguous regexp literal.
1370
- w_space+ '/'
1361
+ # a %{1}, a %[1] (but not "a %=1=" or "a % foo")
1362
+ # a /foo/ (but not "a / foo" or "a /=foo")
1363
+ # a <<HEREDOC
1364
+ w_space+ %{ tm = p }
1365
+ ( [%/] ( c_any - c_space_nl - '=' ) # /
1366
+ | '<<'
1367
+ )
1371
1368
  => {
1372
- diagnostic :warning, :ambiguous_literal, nil, range(@te - 1, @te)
1369
+ if tok(tm, tm + 1) == '/'
1370
+ # Ambiguous regexp literal.
1371
+ diagnostic :warning, :ambiguous_literal, nil, range(tm, tm + 1)
1372
+ end
1373
1373
 
1374
- fhold; fgoto expr_beg;
1374
+ p = tm - 1
1375
+ fgoto expr_beg;
1375
1376
  };
1376
1377
 
1377
1378
  # x *1
@@ -53,6 +53,7 @@ module Parser
53
53
  :unexpected_percent_str => '%{type}: unknown type of percent-literal',
54
54
  :block_and_blockarg => 'both block argument and literal block are passed',
55
55
  :masgn_as_condition => 'multiple assignment in conditional context',
56
+ :block_given_to_yield => 'block given to yield',
56
57
 
57
58
  # Parser warnings
58
59
  :useless_else => 'else without rescue is useless',
@@ -29,7 +29,7 @@ module Parser
29
29
  source_line
30
30
  end
31
31
 
32
- node.loc.to_hash.
32
+ (node.loc || {}).to_hash.
33
33
  sort_by do |name, range|
34
34
  [(range ? range.line : 0),
35
35
  (name == :expression ? 1 : 0)]
@@ -103,7 +103,7 @@ module Parser
103
103
  end
104
104
 
105
105
  node.children.each do |child|
106
- if child.is_a?(AST::Node) && child.location.expression
106
+ if child.is_a?(AST::Node) && child.loc && child.loc.expression
107
107
  prev_node, next_node = next_node, child
108
108
 
109
109
  process(prev_node, child)
@@ -1,3 +1,3 @@
1
1
  module Parser
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
data/test/helper.rb CHANGED
@@ -3,7 +3,7 @@ require 'tempfile'
3
3
  require 'simplecov'
4
4
  require 'coveralls'
5
5
 
6
- if SimpleCov.usable?
6
+ if ENV.include?('COVERAGE') && SimpleCov.usable?
7
7
  if defined?(TracePoint)
8
8
  require_relative 'racc_coverage_helper'
9
9
 
data/test/parse_helper.rb CHANGED
@@ -161,6 +161,23 @@ module ParseHelper
161
161
  end
162
162
  end
163
163
 
164
+ def refute_diagnoses(code, versions=ALL_VERSIONS)
165
+ with_versions(versions) do |version, parser|
166
+ source_file = Parser::Source::Buffer.new('(refute_diagnoses)')
167
+ source_file.source = code
168
+
169
+ begin
170
+ parser = parser.parse(source_file)
171
+ rescue Parser::SyntaxError
172
+ # do nothing; the diagnostic was reported
173
+ end
174
+
175
+ assert_empty @diagnostics,
176
+ "(#{version}) emits no diagnostics, not\n" \
177
+ "#{@diagnostics.map(&:render).join("\n")}"
178
+ end
179
+ end
180
+
164
181
  SOURCE_MAP_DESCRIPTION_RE =
165
182
  /(?x)
166
183
  ^(?# $1 skip) ^(\s*)
data/test/test_lexer.rb CHANGED
@@ -1549,7 +1549,7 @@ class TestLexer < Minitest::Test
1549
1549
  def test_regexp_escape_backslash_slash
1550
1550
  assert_scanned('/\\//',
1551
1551
  :tREGEXP_BEG, "/",
1552
- :tSTRING_CONTENT, '\\/',
1552
+ :tSTRING_CONTENT, '/',
1553
1553
  :tSTRING_END, "/",
1554
1554
  :tREGEXP_OPT, "")
1555
1555
  end
@@ -1557,7 +1557,7 @@ class TestLexer < Minitest::Test
1557
1557
  def test_regexp_escape_backslash_terminator
1558
1558
  assert_scanned('%r%blah\\%blah%',
1559
1559
  :tREGEXP_BEG, "%r%",
1560
- :tSTRING_CONTENT, "blah\\%blah",
1560
+ :tSTRING_CONTENT, "blah%blah",
1561
1561
  :tSTRING_END, "%",
1562
1562
  :tREGEXP_OPT, "")
1563
1563
  end
@@ -1565,7 +1565,7 @@ class TestLexer < Minitest::Test
1565
1565
  def test_regexp_escape_backslash_terminator_meta1
1566
1566
  assert_scanned('%r{blah\\}blah}',
1567
1567
  :tREGEXP_BEG, "%r{",
1568
- :tSTRING_CONTENT, "blah\\}blah",
1568
+ :tSTRING_CONTENT, "blah}blah",
1569
1569
  :tSTRING_END, "}",
1570
1570
  :tREGEXP_OPT, "")
1571
1571
  end
@@ -1573,7 +1573,7 @@ class TestLexer < Minitest::Test
1573
1573
  def test_regexp_escape_backslash_terminator_meta2
1574
1574
  assert_scanned('%r/blah\\/blah/',
1575
1575
  :tREGEXP_BEG, "%r/",
1576
- :tSTRING_CONTENT, "blah\\/blah",
1576
+ :tSTRING_CONTENT, "blah/blah",
1577
1577
  :tSTRING_END, "/",
1578
1578
  :tREGEXP_OPT, "")
1579
1579
  end
@@ -1623,10 +1623,9 @@ class TestLexer < Minitest::Test
1623
1623
  end
1624
1624
 
1625
1625
  def test_regexp_escape_double_backslash
1626
- regexp = '/[\\/\\\\]$/'
1627
- assert_scanned(regexp,
1626
+ assert_scanned('/[\\/\\\\]$/',
1628
1627
  :tREGEXP_BEG, "/",
1629
- :tSTRING_CONTENT, regexp[1..-2],
1628
+ :tSTRING_CONTENT,'[/\\\\]$',
1630
1629
  :tSTRING_END, "/",
1631
1630
  :tREGEXP_OPT, "")
1632
1631
  end
data/test/test_parser.rb CHANGED
@@ -2527,7 +2527,8 @@ class TestParser < Minitest::Test
2527
2527
  assert_diagnoses(
2528
2528
  [:error, :block_and_blockarg],
2529
2529
  %q{fun(&bar) do end},
2530
- %q{ ~~~~ location})
2530
+ %q{ ~~~~ location
2531
+ | ~~ highlights (0)})
2531
2532
  end
2532
2533
 
2533
2534
  # To receiver
@@ -2578,6 +2579,16 @@ class TestParser < Minitest::Test
2578
2579
  |~~~~~~~~~~~~ expression})
2579
2580
  end
2580
2581
 
2582
+ def test_send_plain_cmd_ambiguous_literal
2583
+ assert_diagnoses(
2584
+ [:warning, :ambiguous_literal],
2585
+ %q{m /foo/},
2586
+ %q{ ^ location})
2587
+
2588
+ refute_diagnoses(
2589
+ %q{m %[1]})
2590
+ end
2591
+
2581
2592
  def test_send_plain_cmd_ambiguous_prefix
2582
2593
  assert_diagnoses(
2583
2594
  [:warning, :ambiguous_prefix, { :prefix => '+' }],
@@ -3156,6 +3167,20 @@ class TestParser < Minitest::Test
3156
3167
  |~~~~~ expression})
3157
3168
  end
3158
3169
 
3170
+ def test_yield_block
3171
+ assert_diagnoses(
3172
+ [:error, :block_given_to_yield],
3173
+ %q{yield foo do end},
3174
+ %q{~~~~~ location
3175
+ | ~~ highlights (0)})
3176
+
3177
+ assert_diagnoses(
3178
+ [:error, :block_given_to_yield],
3179
+ %q{yield(&foo)},
3180
+ %q{~~~~~ location
3181
+ | ~~~~ highlights (0)})
3182
+ end
3183
+
3159
3184
  # Call arguments
3160
3185
 
3161
3186
  def test_args_cmd
@@ -3873,7 +3898,8 @@ class TestParser < Minitest::Test
3873
3898
  s(:str, 'wat'),
3874
3899
  s(:regopt))),
3875
3900
  nil, nil),
3876
- %q{if /wat/; end})
3901
+ %q{if /wat/; end},
3902
+ %q{ ~~~~~ expression (match_current_line)})
3877
3903
  end
3878
3904
 
3879
3905
  # Case matching
@@ -4132,6 +4158,18 @@ class TestParser < Minitest::Test
4132
4158
  |~~~~~ expression})
4133
4159
  end
4134
4160
 
4161
+ def test_break_block
4162
+ assert_parses(
4163
+ s(:break,
4164
+ s(:block,
4165
+ s(:send, nil, :fun, s(:lvar, :foo)),
4166
+ s(:args), nil)),
4167
+ %q{break fun foo do end},
4168
+ %q{ ~~~~~~~~~~~~~~ expression (block)
4169
+ |~~~~~~~~~~~~~~~~~~~~ expression},
4170
+ ALL_VERSIONS - %w(1.8))
4171
+ end
4172
+
4135
4173
  def test_return
4136
4174
  assert_parses(
4137
4175
  s(:return, s(:begin, s(:lvar, :foo))),
@@ -4167,6 +4205,18 @@ class TestParser < Minitest::Test
4167
4205
  |~~~~~~ expression})
4168
4206
  end
4169
4207
 
4208
+ def test_return_block
4209
+ assert_parses(
4210
+ s(:return,
4211
+ s(:block,
4212
+ s(:send, nil, :fun, s(:lvar, :foo)),
4213
+ s(:args), nil)),
4214
+ %q{return fun foo do end},
4215
+ %q{ ~~~~~~~~~~~~~~ expression (block)
4216
+ |~~~~~~~~~~~~~~~~~~~~~ expression},
4217
+ ALL_VERSIONS - %w(1.8))
4218
+ end
4219
+
4170
4220
  def test_next
4171
4221
  assert_parses(
4172
4222
  s(:next, s(:begin, s(:lvar, :foo))),
@@ -4202,6 +4252,18 @@ class TestParser < Minitest::Test
4202
4252
  |~~~~ expression})
4203
4253
  end
4204
4254
 
4255
+ def test_next_block
4256
+ assert_parses(
4257
+ s(:next,
4258
+ s(:block,
4259
+ s(:send, nil, :fun, s(:lvar, :foo)),
4260
+ s(:args), nil)),
4261
+ %q{next fun foo do end},
4262
+ %q{ ~~~~~~~~~~~~~~ expression (block)
4263
+ |~~~~~~~~~~~~~~~~~~~ expression},
4264
+ ALL_VERSIONS - %w(1.8))
4265
+ end
4266
+
4205
4267
  def test_redo
4206
4268
  assert_parses(
4207
4269
  s(:redo),
@@ -83,4 +83,25 @@ end
83
83
 
84
84
  assert_equal 0, associations.size
85
85
  end
86
+
87
+ def test_associate_stray_comment
88
+ ast, associations = associate(<<-END)
89
+ def foo
90
+ # foo
91
+ end
92
+ END
93
+
94
+ assert_equal 0, associations.size
95
+ end
96
+
97
+ def test_associate___ENCODING__
98
+ ast, associations = associate(<<-END)
99
+ # foo
100
+ __ENCODING__
101
+ END
102
+
103
+ assert_equal 1, associations.size
104
+ assert_equal ['# foo'],
105
+ associations[ast].map(&:text)
106
+ end
86
107
  end
metadata CHANGED
@@ -1,75 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-05 00:00:00.000000000 Z
11
+ date: 2014-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: slop
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.4'
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 3.4.5
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ~>
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3.4'
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.4.5
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.2'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.2'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0.9'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0.9'
75
75
  - !ruby/object:Gem::Dependency
@@ -90,140 +90,140 @@ dependencies:
90
90
  name: cliver
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ~>
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: 0.3.0
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: 0.3.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: yard
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: kramdown
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - '>='
121
+ - - ">="
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - '>='
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: minitest
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - ~>
135
+ - - "~>"
136
136
  - !ruby/object:Gem::Version
137
137
  version: '5.0'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ~>
142
+ - - "~>"
143
143
  - !ruby/object:Gem::Version
144
144
  version: '5.0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: simplecov
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ~>
149
+ - - "~>"
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0.7'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ~>
156
+ - - "~>"
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0.7'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: coveralls
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - '>='
170
+ - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: json_pure
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - '>='
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - '>='
184
+ - - ">="
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: mime-types
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
- - - ~>
191
+ - - "~>"
192
192
  - !ruby/object:Gem::Version
193
193
  version: '1.25'
194
194
  type: :development
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
- - - ~>
198
+ - - "~>"
199
199
  - !ruby/object:Gem::Version
200
200
  version: '1.25'
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: simplecov-sublime-ruby-coverage
203
203
  requirement: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - '>='
205
+ - - ">="
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
- - - '>='
212
+ - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: gauntlet
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
- - - '>='
219
+ - - ">="
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
- - - '>='
226
+ - - ">="
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  description: A Ruby parser written in pure Ruby.
@@ -235,10 +235,10 @@ executables:
235
235
  extensions: []
236
236
  extra_rdoc_files: []
237
237
  files:
238
- - .gitignore
239
- - .rubocop.yml
240
- - .travis.yml
241
- - .yardopts
238
+ - ".gitignore"
239
+ - ".rubocop.yml"
240
+ - ".travis.yml"
241
+ - ".yardopts"
242
242
  - CHANGELOG.md
243
243
  - CONTRIBUTING.md
244
244
  - Gemfile
@@ -264,15 +264,20 @@ files:
264
264
  - lib/parser/current.rb
265
265
  - lib/parser/diagnostic.rb
266
266
  - lib/parser/diagnostic/engine.rb
267
+ - lib/parser/lexer.rb
267
268
  - lib/parser/lexer.rl
268
269
  - lib/parser/lexer/explanation.rb
269
270
  - lib/parser/lexer/literal.rb
270
271
  - lib/parser/lexer/stack_state.rb
271
272
  - lib/parser/messages.rb
272
273
  - lib/parser/rewriter.rb
274
+ - lib/parser/ruby18.rb
273
275
  - lib/parser/ruby18.y
276
+ - lib/parser/ruby19.rb
274
277
  - lib/parser/ruby19.y
278
+ - lib/parser/ruby20.rb
275
279
  - lib/parser/ruby20.y
280
+ - lib/parser/ruby21.rb
276
281
  - lib/parser/ruby21.y
277
282
  - lib/parser/runner.rb
278
283
  - lib/parser/runner/ruby_parse.rb
@@ -318,11 +323,6 @@ files:
318
323
  - test/test_source_rewriter.rb
319
324
  - test/test_source_rewriter_action.rb
320
325
  - test/test_static_environment.rb
321
- - lib/parser/lexer.rb
322
- - lib/parser/ruby18.rb
323
- - lib/parser/ruby19.rb
324
- - lib/parser/ruby20.rb
325
- - lib/parser/ruby21.rb
326
326
  homepage: http://github.com/whitequark/parser
327
327
  licenses:
328
328
  - MIT
@@ -333,17 +333,17 @@ require_paths:
333
333
  - lib
334
334
  required_ruby_version: !ruby/object:Gem::Requirement
335
335
  requirements:
336
- - - '>='
336
+ - - ">="
337
337
  - !ruby/object:Gem::Version
338
338
  version: '0'
339
339
  required_rubygems_version: !ruby/object:Gem::Requirement
340
340
  requirements:
341
- - - '>='
341
+ - - ">="
342
342
  - !ruby/object:Gem::Version
343
343
  version: '0'
344
344
  requirements: []
345
345
  rubyforge_project:
346
- rubygems_version: 2.0.14
346
+ rubygems_version: 2.2.0.preview.1
347
347
  signing_key:
348
348
  specification_version: 4
349
349
  summary: A Ruby parser written in pure Ruby.