parser 2.7.1.5 → 3.0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/parser/all.rb +1 -0
  3. data/lib/parser/ast/processor.rb +3 -0
  4. data/lib/parser/base.rb +1 -0
  5. data/lib/parser/builders/default.rb +126 -13
  6. data/lib/parser/context.rb +4 -0
  7. data/lib/parser/current.rb +16 -7
  8. data/lib/parser/current_arg_stack.rb +5 -2
  9. data/lib/parser/lexer.rb +872 -802
  10. data/lib/parser/max_numparam_stack.rb +12 -4
  11. data/lib/parser/messages.rb +1 -0
  12. data/lib/parser/meta.rb +4 -3
  13. data/lib/parser/ruby18.rb +6 -2
  14. data/lib/parser/ruby27.rb +3763 -3704
  15. data/lib/parser/ruby28.rb +8047 -0
  16. data/lib/parser/ruby30.rb +3657 -3649
  17. data/lib/parser/ruby31.rb +8226 -0
  18. data/lib/parser/runner.rb +6 -1
  19. data/lib/parser/source/buffer.rb +50 -27
  20. data/lib/parser/source/comment.rb +13 -0
  21. data/lib/parser/source/comment/associator.rb +17 -4
  22. data/lib/parser/source/tree_rewriter.rb +27 -0
  23. data/lib/parser/static_environment.rb +4 -0
  24. data/lib/parser/variables_stack.rb +4 -0
  25. data/lib/parser/version.rb +1 -1
  26. data/parser.gemspec +1 -20
  27. metadata +8 -95
  28. data/.travis.yml +0 -41
  29. data/.yardopts +0 -21
  30. data/CHANGELOG.md +0 -1137
  31. data/CONTRIBUTING.md +0 -17
  32. data/Gemfile +0 -10
  33. data/README.md +0 -309
  34. data/Rakefile +0 -167
  35. data/ci/run_rubocop_specs +0 -14
  36. data/doc/AST_FORMAT.md +0 -2284
  37. data/doc/CUSTOMIZATION.md +0 -37
  38. data/doc/INTERNALS.md +0 -21
  39. data/doc/css/.gitkeep +0 -0
  40. data/doc/css/common.css +0 -68
  41. data/lib/parser/lexer.rl +0 -2550
  42. data/lib/parser/macruby.y +0 -2208
  43. data/lib/parser/ruby18.y +0 -1936
  44. data/lib/parser/ruby19.y +0 -2185
  45. data/lib/parser/ruby20.y +0 -2363
  46. data/lib/parser/ruby21.y +0 -2364
  47. data/lib/parser/ruby22.y +0 -2371
  48. data/lib/parser/ruby23.y +0 -2377
  49. data/lib/parser/ruby24.y +0 -2415
  50. data/lib/parser/ruby25.y +0 -2412
  51. data/lib/parser/ruby26.y +0 -2420
  52. data/lib/parser/ruby27.y +0 -2949
  53. data/lib/parser/ruby30.y +0 -3048
  54. data/lib/parser/rubymotion.y +0 -2192
  55. data/test/bug_163/fixtures/input.rb +0 -5
  56. data/test/bug_163/fixtures/output.rb +0 -5
  57. data/test/bug_163/rewriter.rb +0 -20
  58. data/test/helper.rb +0 -103
  59. data/test/parse_helper.rb +0 -328
  60. data/test/racc_coverage_helper.rb +0 -133
  61. data/test/test_ast_processor.rb +0 -32
  62. data/test/test_base.rb +0 -31
  63. data/test/test_current.rb +0 -31
  64. data/test/test_diagnostic.rb +0 -95
  65. data/test/test_diagnostic_engine.rb +0 -59
  66. data/test/test_encoding.rb +0 -99
  67. data/test/test_lexer.rb +0 -3617
  68. data/test/test_lexer_stack_state.rb +0 -78
  69. data/test/test_meta.rb +0 -12
  70. data/test/test_parse_helper.rb +0 -83
  71. data/test/test_parser.rb +0 -9986
  72. data/test/test_runner_parse.rb +0 -56
  73. data/test/test_runner_rewrite.rb +0 -47
  74. data/test/test_source_buffer.rb +0 -165
  75. data/test/test_source_comment.rb +0 -36
  76. data/test/test_source_comment_associator.rb +0 -399
  77. data/test/test_source_map.rb +0 -14
  78. data/test/test_source_range.rb +0 -192
  79. data/test/test_source_rewriter.rb +0 -541
  80. data/test/test_source_rewriter_action.rb +0 -46
  81. data/test/test_source_tree_rewriter.rb +0 -361
  82. data/test/test_static_environment.rb +0 -45
  83. data/test/using_tree_rewriter/fixtures/input.rb +0 -3
  84. data/test/using_tree_rewriter/fixtures/output.rb +0 -3
  85. data/test/using_tree_rewriter/using_tree_rewriter.rb +0 -9
data/.travis.yml DELETED
@@ -1,41 +0,0 @@
1
- dist: trusty
2
- language: ruby
3
- jobs:
4
- include:
5
- - name: jruby-9.1.15.0 / Parser tests
6
- rvm: jruby-9.1.15.0
7
- script: bundle exec rake test
8
- - name: truffleruby / Parser tests
9
- rvm: truffleruby
10
- script: TRUFFLERUBYOPT=--engine.Mode=latency bundle exec rake test
11
- - name: 2.4.10 / Parser tests
12
- rvm: 2.4.10
13
- script: bundle exec rake test_cov
14
- - name: 2.5.8 / Parser tests
15
- rvm: 2.5.8
16
- script: bundle exec rake test_cov
17
- - name: 2.6.6 / Parser tests
18
- rvm: 2.6.6
19
- script: bundle exec rake test_cov
20
- - name: 2.7.1 / Parser tests
21
- rvm: 2.7.1
22
- script: bundle exec rake test_cov
23
- - name: ruby-head / Parser tests
24
- rvm: ruby-head
25
- script: bundle exec rake test_cov
26
- - name: 2.5.8 / Rubocop tests
27
- rvm: 2.5.8
28
- script: ./ci/run_rubocop_specs
29
- - name: 2.6.6 / Rubocop tests
30
- rvm: 2.6.6
31
- script: ./ci/run_rubocop_specs
32
- - name: 2.7.1 / Rubocop tests
33
- rvm: 2.7.1
34
- script: ./ci/run_rubocop_specs
35
- allow_failures:
36
- - rvm: ruby-head
37
- - rvm: truffleruby
38
- - script: ./ci/run_rubocop_specs
39
- before_install:
40
- - bundle --version
41
- - gem --version
data/.yardopts DELETED
@@ -1,21 +0,0 @@
1
- ./lib/parser/**/*.rb ./lib/parser.rb
2
- -m markdown
3
- -M kramdown
4
- -o ./yardoc
5
- -r ./README.md
6
- --asset ./doc/css/common.css:css/common.css
7
- --verbose
8
- --api public
9
- --exclude lib/parser/lexer.rb
10
- --exclude lib/parser/ruby18.rb
11
- --exclude lib/parser/ruby19.rb
12
- --exclude lib/parser/ruby20.rb
13
- --exclude lib/parser/ruby21.rb
14
- --exclude lib/parser/ruby22.rb
15
- --exclude lib/parser/ruby23.rb
16
- --exclude lib/parser/ruby24.rb
17
- --exclude lib/parser/macruby.rb
18
- --exclude lib/parser/rubymotion.rb
19
- -
20
- ./doc/*.md
21
- LICENSE.txt
data/CHANGELOG.md DELETED
@@ -1,1137 +0,0 @@
1
- Changelog
2
- =========
3
-
4
- Not released (2020-09-24)
5
- -------------------------
6
-
7
- API modifications:
8
- * right assignment: use existing AST node types (#738) (#739) (Marc-André Lafortune)
9
- * ruby28.y -> ruby30.y (#729) (Vladimir Dementyev)
10
-
11
- Features implemented:
12
- * Optimize Range#column_range (#741) (Marc-André Lafortune)
13
- * ruby30.y: reject endless setter. (#736) (Ilya Bylich)
14
- * ruby28.y: reject assignment to numparam. (#725) (Ilya Bylich)
15
- * emit "endless method def" as `:def` node. (#716) (Ilya Bylich)
16
-
17
- Bugs fixed:
18
- * rename 2.8 to 3.0 everywhere (#732) (Ilya Bylich)
19
- * test_current.rb: 2.8 -> 3.0 (#731) (Vladimir Dementyev)
20
- * Parser#parse returns nil instead of false if error is thrown (#722) (Marc-André Lafortune)
21
- * unify locations for normal and endless method definition (#718) (Marc-André Lafortune)
22
- * ruby27.y: accept const names as hash keys for pattern matching (#717) (Koichi ITO)
23
- * Fix locations for alias / undef nodes with internal symbols (#715) (Marc-André Lafortune)
24
-
25
- v2.7.1.4 (2020-06-19)
26
- ---------------------
27
-
28
- Features implemented:
29
- * ruby28.y: add find pattern. (#714) (Ilya Bylich)
30
- * lexer.rl: reject `->...` and `->(...)` with the same error. (#713) (Ilya Bylich)
31
- * ruby28.y: accept leading args before forward arg. (#712) (Ilya Bylich)
32
- * Added `emit_forward_arg` compatibility flag. (#710) (Ilya Bylich)
33
- * ruby28.y: include entire lambda expr in lambda rule. (#708) (Ilya Bylich)
34
- * ruby28.y: extracted excessed_comma rule. (#706) (Ilya Bylich)
35
- * Source::TreeRewriter: Improved merging and representations (#703) (Marc-André Lafortune)
36
-
37
- Bugs fixed:
38
- * ruby*.y: fixed context inside lambda args and module. (#709) (Ilya Bylich)
39
-
40
- v2.7.1.3 (2020-05-26)
41
- ---------------------
42
-
43
- API modifications:
44
- * fixed all warnings. tests are running in verbose mode now. (#685) (Ilya Bylich)
45
-
46
- Features implemented:
47
- * ruby-[parse, rewrite]: add legacy switches (#699) (Marc-André Lafortune)
48
- * Added Parser::Source::Range#to_range. (#697) (Ilya Bylich)
49
- * ruby28.y: support rescue modifier in endless method definition. (#696) (Ilya Bylich)
50
- * ruby28.y: unify kwrest and no-kwrest rules. (#694) (Ilya Bylich)
51
- * ruby28.y: add right hand assignment (#682) (Vladimir Dementyev)
52
-
53
- Bugs fixed:
54
- * fix Comment.associate for postfix conditions/loops (#688) (Marc-André Lafortune)
55
-
56
- v2.7.1.2 (2020-04-30)
57
- ---------------------
58
-
59
- Features implemented:
60
- * ruby28.y: endless method definition (#676) (Vladimir Dementyev)
61
- * ruby28.y: branch parser (#677) (Vladimir Dementyev)
62
-
63
- Bugs fixed:
64
- * ruby27.y: reject invalid lvar in pattern matching (#680) (Vladimir Dementyev)
65
-
66
- v2.7.1.1 (2020-04-15)
67
- ---------------------
68
-
69
- Features implemented:
70
- * Add Source::Range#eql? and hash (#675) (Marc-André Lafortune)
71
- * Source::TreeRewriter: Add #merge, #merge! and #empty? (#674) (Marc-André Lafortune)
72
-
73
- v2.7.1.0 (2020-04-03)
74
- ---------------------
75
-
76
- API modifications:
77
- * Bump ruby versions to 2.4.10, 2.5.8, 2.6.6, 2.7.1. (#665) (Ilya Bylich)
78
-
79
- Features implemented:
80
- * ruby27.y: allow newlines inside braced pattern. (#664) (Ilya Bylich)
81
- * ruby27.y: Allow trailing comma in hash pattern (#661) (Koichi ITO)
82
-
83
- v2.7.0.5 (2020-03-20)
84
- ---------------------
85
-
86
- Features implemented:
87
- * ruby27.y: fix array pattern with tail source map (#659) (Vladimir Dementyev)
88
-
89
- Bugs fixed:
90
- * builder.rb: fix constant_pattern source map (#660) (Vladimir Dementyev)
91
-
92
- v2.7.0.4 (2020-03-02)
93
- ---------------------
94
-
95
- Bugs fixed:
96
- * lexer.rl: allow spaces before comments-before-leading-dot. (#654) (Ilya Bylich)
97
-
98
- v2.7.0.2 (2020-01-08)
99
- ---------------------
100
-
101
- Bugs fixed:
102
- * lexer.rl: fix paren_nest for curly braces (#646) (Ilya Bylich)
103
-
104
- v2.7.0.1 (2019-12-30)
105
- ---------------------
106
-
107
- Bugs fixed:
108
- * dedenter.rb: prevent `ArgumentError` when processing binary en… (#642) (Koichi ITO)
109
-
110
- v2.7.0.0 (2019-12-26)
111
- ---------------------
112
-
113
- API modifications:
114
- * README.md: documented compatibility issue with EOF chars after… (#637) (Ilya Bylich)
115
- * ruby27.y: refactor logic around 'circular argument reference'(#628) (Ilya Bylich)
116
-
117
- Features implemented:
118
- * ruby27.y: added pattern matching (#574) (Ilya Bylich)
119
- * lexer.rl: parse embedded ivars/cvars starting with digit as str (#639) (Ilya Bylich)
120
- * lexer.rl: warn on `...` at EOL. (#636) (Ilya Bylich)
121
- * ruby27.y: removed opt_block_args_tail: tOROP rule. (#635) (Ilya Bylich)
122
- * ruby27.y: reverted method reference operator (added in #634) (Ilya Bylich)
123
- * ruby27.y: treat numparams as locals outside numblock. (#633) (Ilya Bylich)
124
-
125
- Bugs fixed:
126
- * dedenter.rb: fixed over-dedenting of squiggly heredocs (#641) (Ilya Bylich)
127
- * ruby27.y: added "arguments forwarding" (#625) (Ilya Bylich)
128
- * ruby27.y: reject circular argument reference. (#622) (Ilya Bylich)
129
- * ruby27.y: changed prefix of numparams to "_" (#620) (Ilya Bylich)
130
-
131
- v2.6.5.0 (2019-10-03)
132
- ---------------------
133
-
134
- API modifications:
135
- * Bump ruby versions to 2.4.9, 2.5.7 and 2.6.5. (#619) (Ilya Bylich)
136
-
137
- Features implemented:
138
- * lexer.rl: changed max numparam to `@9` (#617) (Ilya Bylich)
139
- * lexer.rl: support comments before leading dot in 27 mode. (#613) (Ilya Bylich)
140
-
141
- Bugs fixed:
142
- * lexer.rl: emit tMETHREF as tDOT+tCOLON for rubies \< 27. (#614) (Ilya Bylich)
143
-
144
- v2.6.4.1 (2019-09-12)
145
- ---------------------
146
-
147
- Bugs fixed:
148
- * lexer.rl: fix parsing of 'm a + b do end' (#605) (Ilya Bylich)
149
-
150
- v2.6.4.0 (2019-08-30)
151
- ---------------------
152
-
153
- API modifications:
154
- * Added specs for heredocs with mixed encoding. (#581) (Ilya Bylich)
155
-
156
- Features implemented:
157
- * ruby27.y: Revert "pipeline operator" (#601) (Koichi ITO)
158
- * ruby27.y: Fix parsing of mutiple assignment with rescue modifier (#600) (Koichi ITO)
159
- * ruby27.y: hoisted out f_rest_marg. (#594) (Ilya Bylich)
160
- * ruby27.y: added pipeline operator. (#592) (Ilya Bylich)
161
- * ruby27.y: reject safe navigator in LHS of mass-assignment. (#586) (Ilya Bylich)
162
- * lexer.rl: reject whitespaces in meta and control chars. (#585) (Ilya Bylich)
163
- * lexer.rl: Reject numparams as symbol literals. (#582) (Ilya Bylich)
164
- * ruby27.y: Added numbered parameters support. (#565) (Ilya Bylich)
165
- * lexer.rl: Reject \n and \r in heredoc identifiers starting from 2.7. (#575) (Ilya Bylich)
166
-
167
- Bugs fixed:
168
- * ruby-parse: print empty string when --emit-json and empty input are given. (#590) (Ilya Bylich)
169
- * AST_FORMAT: fixed documentation of the string with interpolation. (#589) (Ilya Bylich)
170
- * builder.rb, processor.rb: Changed format of the procarg0 node. (#587) (Ilya Bylich)
171
-
172
- v2.6.3.0 (2019-04-28)
173
- ---------------------
174
-
175
- Features implemented:
176
- * ruby27.y: Added beginless ranges support. (#570) (Ilya Bylich)
177
-
178
- v2.6.2.1 (2019-04-05)
179
- ---------------------
180
-
181
- API modifications:
182
- * Bump 2.4 branch to 2.4.6. (#569) (Ilya Bylich)
183
- * Lexer should know about current parsing context. (#566) (Ilya Bylich)
184
-
185
- v2.6.2.0 (2019-03-21)
186
- ---------------------
187
-
188
- API modifications:
189
- * Bump ruby versions to 2.5.5 and 2.6.2. (#563) (Ilya Bylich)
190
- * Bump Ruby version to 2.6.1. (#554) (Ilya Bylich)
191
-
192
- Features implemented:
193
- * ruby27.y: dsym should be treated as string. (#560) (Ilya Bylich)
194
- * ruby27.y: Refactored symbol rules. (#557) (Ilya Bylich)
195
- * ruby27.y: Added method reference operator. (#556) (Ilya Bylich)
196
- * ruby27.y: branch parser. (#546) (Ilya Bylich)
197
-
198
- v2.6.0.0 (2019-01-16)
199
- ---------------------
200
-
201
- API modifications:
202
- * 2.6.0 was released, unmark is as -dev. (#538) (Ilya Bylich)
203
-
204
- Bugs fixed:
205
- * Fix parsing of "\\\n" escaped sequences in various literals. (#539) (Ilya Bylich)
206
-
207
- v2.5.3.0 (2018-10-29)
208
- ---------------------
209
-
210
- Bugs fixed:
211
- * lexer.rl: Fix parsing of 'm :key => m do; m() do end; end'. (#526) (Ilya Bylich)
212
- * lexer.rl: Fix parsing of ambiguous 1re. (#523) (Ilya Bylich)
213
-
214
- v2.5.1.2 (2018-07-10)
215
- ---------------------
216
-
217
- Bugs fixed:
218
- * lexer.rl: Partially revert 5ba072d and properly handle 'm = -> *args do end'. (Ilya Bylich)
219
-
220
- v2.5.1.1 (2018-07-10)
221
- ---------------------
222
-
223
- Features implemented:
224
- * ruby26.y: Endless ranges support. (Ilya Bylich)
225
-
226
- Bugs fixed:
227
- * lexer.rl: Fix parsing of 'm = -> *args do end'. (Ilya Bylich)
228
- * AST::Processor: Properly recurse into "kwsplat" nodes (Nelson Elhage)
229
- * ruby24, ruby25, ruby26: Fix cmdargs after command_args followed by tLBRACE_ARG. This commit tracks upstream commit ruby/ruby@f168dbd. (Ilya Bylich)
230
- * lexer.rl: Fix parsing of `let (:a) { m do; end }`. (Ilya Bylich)
231
-
232
- v2.5.1.0 (2018-04-12)
233
- ---------------------
234
-
235
- API modifications:
236
- * Parser::Current: bump latest 2.2 branch to 2.2.10. (Ilya Bylich)
237
-
238
- Features implemented:
239
- * ruby26.y: Raise a syntax error on 'else' without 'rescue'. This commit tracks upstream commit ruby/ruby@140512d. (Ilya Bylich)
240
-
241
- Bugs fixed:
242
- * lexer.rl, Dedenter: Treat slash in heredocs as a line continuation. (Ilya Bylich)
243
- * lexer.rl: Fix parsing of `a ? b + '': nil`. (Ilya Bylich)
244
- * lexer.rl: Reject `m a: {} {}` and `m [] {}` since 25. (Ilya Bylich)
245
- * builders/default: allow class/module/dynamic constant definition in the method body if there's a sclass between them. (bug #490) (Ilya Bylich)
246
- * lexer.rl: Emit :!@ as :!, :~@ as :~. (Ilya Bylich)
247
- * parse{23,24,25}.y: use only CMDARG/COND _PUSH/POP for cmdarg/cond management. (bug #481) (Ilya Bylich)
248
- * lexer.rl: emit tSTRING_BEG and tSTRING_DBEG one by one to allow parser to properly manipulate cmdarg stack. (bug #480) (Ilya Bylich)
249
-
250
- v2.5.0.4 (2018-03-13)
251
- ---------------------
252
-
253
- Bugs fixed:
254
- * AST::Processor: handle on_index, on_indexasgn, on_lambda. (Ilya Bylich)
255
-
256
- v2.5.0.3 (2018-03-06)
257
- ---------------------
258
-
259
- Bugs fixed:
260
- * Accept `BEGIN` and `END` as correct method name (#463) (Masataka Pocke Kuwabara)
261
- * Parser::Source::Buffer: Fixed parsing of encoding comment when the file contains only shebang. (Ilya Bylich)
262
-
263
- v2.5.0.2 (2018-02-22)
264
- ---------------------
265
-
266
- Bugs fixed:
267
- * ruby24.y, ruby25.y: Replicate cmdargs handling from MRI. (#453) (Ilya Bylich)
268
-
269
- v2.5.0.1 (2018-02-21)
270
- ---------------------
271
-
272
- Features implemented:
273
- * builders/default: __ENCODING__: emit as s(:__ENCODING__) via AST opt-in. (whitequark)
274
- * ruby25.y: Extract expr_value_do rule. This commit tracks upstream commit ruby/ruby@508533f. (Ilya Bylich)
275
- * ruby25.y: Extract begin_block rule. This commit tracks upstream commit ruby/ruby@762d23c. (Ilya Bylich)
276
- * ruby25.y: Allow class and method definition in the while condition. (#432) (Ilya Bylich)
277
- * ruby25: Allow `-> do rescue; end`. (#431) (Ilya Bylich)
278
-
279
- Bugs fixed:
280
- * parser/current: latest released Ruby series is 2.5.x. (whitequark)
281
- * builders/default: x[], x[]=1: emit as s(:index), s(:indexasgn) via AST opt-in. (whitequark)
282
- * lexer.rl: "#{-> foo {}}": fix parsing of interpolated lambda with open args. (Ilya Bylich)
283
-
284
- v2.5.0.0 (2018-02-16)
285
- ---------------------
286
-
287
- API modifications:
288
- * Parser::Current: bump to 2.2.9 and 2.3.6. (Stan Hu)
289
- * Deprecate Parser::Rewriter (Marc-Andre Lafortune)
290
- * Deprecate Parser::Source::Rewriter (Marc-Andre Lafortune)
291
- * Change relative order of insert_after_multi and insert_before_multi for non-empty ranges (#399). (Marc-Andre Lafortune)
292
-
293
- Features implemented:
294
- * parse.y: Reject brace after literal arg. This commit tracks upstream commits ruby/ruby@9987109 and ruby/ruby@7d6965f. (Ilya Bylich)
295
- * ruby-parse: add an option for emitting AST as JSON. (Alex Rattray)
296
- * Add Parser::TreeRewriter (Marc-Andre Lafortune)
297
- * Add Parser::Rewriter#wrap to ease compatibility (Marc-Andre Lafortune)
298
- * Add Parser::Source::TreeRewriter (Marc-Andre Lafortune)
299
- * Add Range#\<=> and include Comparable (Marc-Andre Lafortune)
300
- * parse.y: disable tLPAREN_ARG state after local variable. (Ilya Bylich)
301
- * SourceBuffer#source_range (Marc-Andre Lafortune)
302
- * Range#adjust (Marc-Andre Lafortune)
303
- * Range#contains?, contained?, crossing? (Marc-Andre Lafortune)
304
- * Add Range#with. (Marc-André Lafortune)
305
- * lexer.rl: Relax restriction spaces inside "\u{...}". This commit tracks upstream commit ruby/ruby@7e8b910. (Ilya Bylich)
306
- * lexer.rl: Allow newlines in heredoc identifiers. This commit tracks upstream commit ruby/ruby@d25faa4. (Ilya Bylich)
307
- * lexer.rl: allow do after cmdarg in paren. This commit tracks upstream commit ruby/ruby@046c943. (Ilya Bylich)
308
-
309
- Bugs fixed:
310
- * Fixed magic encoding comment parsing when encoding comment is on the first line but not in the beginning. (Ilya Bylich)
311
- * lexer.rl: Parse '1if' as '1 if', '1rescue' as '1 rescue'. (Ilya Bylich)
312
- * lexer.rl: Save state before entering a block comment to enter it after =end. (Ilya Bylich)
313
- * parse.y: Prohibit return in class/module body except for singleton class. Replaced @def_level/in_def? in favor of context.indirectly_in_def?. This commit tracks upstream commit ruby/ruby@8c15f40ac. (Ilya Bylich)
314
- * lexer.rl: Emit :&& as tSYMBEG + tANDOP, :|| as tSYMBEG + tOROP. (Ilya Bylich)
315
- * ruby{24,25}.y: preserve cmdarg stack around do/end block [Bug #13073]. (Mateusz Lenik)
316
- * Parser::Lexer::State: Fixed #lexpop to match MRI behavior. (Ilya Bylich)
317
-
318
- v2.4.0.2 (2017-11-13)
319
- ---------------------
320
-
321
- API modifications:
322
- * parser/current: update for 2.3.5 release. (whitequark)
323
-
324
- v2.4.0.1 (2017-11-13)
325
- ---------------------
326
-
327
- API modifications:
328
- * parser/current: update for 2.3.4 release. (whitequark)
329
- * parser/current: update for Ruby 2.1.10 and 2.2.7. (Koichi ITO)
330
-
331
- Features implemented:
332
- * Allow rescue/else/ensure inside do/end blocks. [Feature #12906] (Ilya Bylich)
333
- * ruby25.y: branch parser. (Ilya Bylich)
334
-
335
- Bugs fixed:
336
- * Source::Comment::Associator: skip -*- magic comments -*-. (Denis Defreyne)
337
- * lexer.rl: "- 5": allow whitespace after tUNARY_NUM. (whitequark)
338
- * *ruby*.y, Builders::Default: "+5": don't lose location of the "+". (whitequark)
339
- * ruby-rewrite: allow passing paths to --load. (whitequark)
340
- * builders/default: "def x; else; end": don't crash. (whitequark)
341
-
342
- v2.4.0.0 (2017-02-07)
343
- ---------------------
344
-
345
- API modifications:
346
- * parser/current: update for the 2.4 release. (whitequark)
347
- * rubymotion.y: "a&.b": implement safe navigation operator in RubyMotion. (Mark Villacampa)
348
-
349
- Bugs fixed:
350
- * lexer.rl: "a &. b": accept &. in EXPR_ARG also. (whitequark)
351
-
352
- v2.3.3.1 (2016-12-02)
353
- ---------------------
354
-
355
- API modifications:
356
- * parser/current: update 2.2 warning to 2.2.6 (Jordan Moncharmont)
357
-
358
- v2.3.3.0 (2016-11-28)
359
- ---------------------
360
-
361
- API modifications:
362
- * parser/current: update 2.3 branch to 2.3.3. (Philip Arndt)
363
-
364
- Bugs fixed:
365
- * ruby24.y: "a += b += raise :x": fix errors with chained op-assignments. (whitequark)
366
- * ruby24.y: "p p{p(p);p p}, tap do end": preserve cmdarg stack. (whitequark)
367
- * ruby24.y: "a b{c d}, :e do end": go to EXPR_ENDARG after literal. (whitequark)
368
-
369
- v2.3.2.0 (2016-11-20)
370
- ---------------------
371
-
372
- API modifications:
373
- * parser/current: update 2.3 branch to 2.3.2. (whitequark)
374
- * Introduce (procarg0) node for a single required block argument. (Ilya Bylich)
375
-
376
- Bugs fixed:
377
- * {macruby,ruby{19,20,21,22,23,24}}.y: "x::A += m x": treat as constant assignment. (whitequark)
378
- * ruby24.y: "x += raise y rescue nil": bind rescue tighter than tOP_ASGN. (whitequark)
379
- * ruby24.y: "x = raise y rescue nil": bind rescue tighter than =. (whitequark)
380
- * Builders::Default: "begin; else; 1; end": fix a crash. (whitequark)
381
-
382
- v2.3.1.3 (2016-09-17)
383
- ---------------------
384
-
385
- API modifications:
386
- * parser/current: latest 2.3 release is 2.3.2. (Chris Riddoch)
387
-
388
- Features implemented:
389
- * ruby24.y: "f (g rescue nil)": allow stmt after tLPAREN_ARG. (whitequark)
390
-
391
- Bugs fixed:
392
- * ruby{18,19,20,21,22,23,24}.y: parse trailing commas as mlhs for block args "a.b{ |c,| d }" (fixes #312) (John Backus)
393
- * Builders::Default: "begin; 1; else; 2; end": do not drop else. (whitequark)
394
- * Builders::Default: "a&.b &&= c": fix safe navigation in lhs of op-assignment. (Ilya Bylich)
395
- * AST::Processor: handle "csend" as "send". (#301) (Ilya Bylich)
396
- * Parser::AST::Processor: do not spuriously modify ASTs. (Ilya Bylich)
397
- * lexer.rl: "%w\a b\": lex backslash-delimited words literals. (Masataka Kuwabara)
398
-
399
- v2.3.1.2 (2016-06-02)
400
- ---------------------
401
-
402
- API modifications:
403
- * parser/current: update 2.2 warning to 2.2.5 (#295) (Kohei Suzuki)
404
-
405
- Bugs fixed:
406
- * AST_FORMAT: Fix `kwarg` example (#294) (Magnus Holm)
407
-
408
- v2.3.1.1 (2016-06-01)
409
- ---------------------
410
-
411
- Bugs fixed:
412
- * ruby{^18}.y: "lambda{|;a|a}": treat shadowarg as local inside block. (Ilya Bylich)
413
- * Builders::Default: "foo&.bar{}": emit csend in block properly. (whitequark)
414
- * runner.rb: re-add --23 (cremno)
415
- * runner.rb: make --24 actually use the 2.4 parser (cremno)
416
-
417
- v2.3.1.0 (2016-04-27)
418
- ---------------------
419
-
420
- Features implemented:
421
- * Parser::Current: update for Ruby 2.3.1. (whitequark)
422
- * Builders::Default: allow masgn in conditional context on >=Ruby 2.4. (whitequark)
423
- * ruby24.y: branch parser. (whitequark)
424
-
425
- Bugs fixed:
426
- * lexer.rl: "def x y; y A::B, ''; end": reject X:: in EXPR_ENDFN (fixes #285). (whitequark)
427
-
428
- v2.3.0.7 (2016-03-25)
429
- ---------------------
430
-
431
- API modifications:
432
- * Source::Diagnostic: handle ranges pointing to newlines (#273). (whitequark)
433
-
434
- Features implemented:
435
- * Parser::Base#tokenize: allow recovery from syntax errors. (whitequark)
436
- * lexer.rl: "a=1; a b: 1": allow label after command clashing with local. (whitequark)
437
- * lexer.rl: "undef %s(x)": emit %s literals in expr_fname in 2.3 mode. (whitequark)
438
-
439
- Bugs fixed:
440
- * Builders::Default: reject non-UTF-8 compatible literals. (whitequark)
441
-
442
- v2.3.0.6 (2016-02-14)
443
- ---------------------
444
-
445
- Bugs fixed:
446
- * lexer.rl: fix EOF location (closes #273). (whitequark)
447
-
448
- v2.3.0.5 (2016-02-12)
449
- ---------------------
450
-
451
- Bugs fixed:
452
- * lexer.rl: "%Q{\あ}": fix encoding of UTF-8 noop escapes. (whitequark)
453
-
454
- v2.3.0.3 (2016-02-06)
455
- ---------------------
456
-
457
- API modifications:
458
- * lexer.rl: "a?=b": lex via tCHARACTER (closes #255). (whitequark)
459
-
460
- v2.3.0.2 (2016-01-24)
461
- ---------------------
462
-
463
- Bugs fixed:
464
- * Add :csend to Parser::Meta::NODE_TYPES (Markus Schirp)
465
- * lexer/dedenter: "\<\<x\n y\\n z\nx": don't dedent after escaped newline. (whitequark)
466
-
467
- v2.3.0.1 (2016-01-14)
468
- ---------------------
469
-
470
- Features implemented:
471
- * ruby23.y: implement optional superclass (cremno)
472
-
473
- v2.3.0.0 (2016-01-14)
474
- ---------------------
475
-
476
- Features implemented:
477
- * parser/current: update for released 2.3. (whitequark)
478
- * parse.y: "\<\<~HEREDOC": implement dedenting heredocs (fixes #228). (whitequark)
479
-
480
- v2.3.0.pre.6 (2015-12-20)
481
- -------------------------
482
-
483
- API modifications:
484
- * parser/current: update 2.2 warning to 2.2.4. (whitequark)
485
- * ruby{22,23}.y: "1 ? p do end : 0". (whitequark)
486
- * lexer.rl: "{%'a':1}": %-string cannot be a label. (whitequark)
487
- * parser/current: update 2.1 warning to 2.1.8. (whitequark)
488
-
489
- Features implemented:
490
- * ruby-parse: add --emit-ruby option. (whitequark)
491
-
492
- Bugs fixed:
493
- * lexer.rl: "f(a ? 'a':1)": disallow quoted label at expr_value. (whitequark)
494
-
495
- v2.3.0.pre.5 (2015-12-16)
496
- -------------------------
497
-
498
- API modifications:
499
- * Source::Diagnostic: output ^^^^^ instead of ^~~~~ (like clang). (whitequark)
500
-
501
- v2.3.0.pre.4 (2015-11-26)
502
- -------------------------
503
-
504
- Bugs fixed:
505
- * ruby23.y: add generated grammar to gemspec. (whitequark)
506
-
507
- v2.3.0.pre.3 (2015-11-25)
508
- -------------------------
509
-
510
- API modifications:
511
- * builders/default: introduce a (lambda) node (fixes #212). (whitequark)
512
- * lexer.rl: do not override argument variable. (Keiji, Yoshimi)
513
- * lexer.rl: rename variable names from lit to current_literal. (Keiji, Yoshimi)
514
- * lexer.rl: use Regexp to match string. (Keiji, Yoshimi)
515
- * lib/parser/source/buffer: reduce respond_to?(:bsearch) (Keiji, Yoshimi)
516
- * lexer.rl: reduce String literal allocations (Keiji, Yoshimi)
517
- * lexer.rl: reduce respond_to?(:encode) method call on #advance (Keiji, Yoshimi)
518
- * lexer.rl: reduce Stirng.length method call on #advance (Keiji, Yoshimi)
519
- * lexer.rl: reduce .class method call on #advance (Keiji, Yoshimi)
520
-
521
- Features implemented:
522
- * lexer.rl, ruby23.y: "a&.b": implement "safe navigation operator" (fixes #209). (whitequark)
523
- * ruby23.y: fork grammar. (whitequark)
524
-
525
- Bugs fixed:
526
- * lexer.rl: never let EOF token location point past EOF. (whitequark)
527
-
528
- v2.2.3.0 (2015-10-08)
529
- ---------------------
530
-
531
- Bugs fixed:
532
- * lexer.rl: "-> a: {}": state after -> is ENDFN, not END (fixes #203). (whitequark)
533
- * ruby{21,22}.y: "p -> { :hello }, a: 1 do end": lexpop cmdarg. (whitequark)
534
-
535
- v2.2.2.6 (2015-06-30)
536
- ---------------------
537
-
538
- API modifications:
539
- * parser/current: link to README from syntax deviation warning. (whitequark)
540
-
541
- v2.3.0.pre.2 (2015-06-15)
542
- -------------------------
543
-
544
- Bugs fixed:
545
- * {macruby,rubymotion}.rb: add to gemspec. (whitequark)
546
-
547
- v2.3.0.pre.1 (2015-06-13)
548
- -------------------------
549
-
550
- API modifications:
551
- * ruby20.y: revert 7f7f2a45. (whitequark)
552
-
553
- Features implemented:
554
- * Add RubyMotion support. (whitequark)
555
- * Add MacRuby support. (whitequark)
556
-
557
- Bugs fixed:
558
- * lexer.rl: "[/()\\1/, ?#]": fixes #198. (whitequark)
559
-
560
- v2.2.2.5 (2015-05-25)
561
- ---------------------
562
-
563
- API modifications:
564
- * Source::Comment::Associator: rework entirely; fixes #194 (Oleg Zubchenko)
565
-
566
- Features implemented:
567
- * Source::Map: add last_line, last_column delegation (Oleg Zubchenko)
568
- * Source::Range: add last_line, last_column methods (Oleg Zubchenko)
569
-
570
- Bugs fixed:
571
- * AST::Processor: add missing on_block_pass (fixes #196) (whitequark)
572
-
573
- v2.2.2.3 (2015-05-17)
574
- ---------------------
575
-
576
- API modifications:
577
- * lexer.rl: "a?? 1 : 0": squelch "invalid character syntax" warning. (whitequark)
578
- * parser/current: bump warnings to 2.0.1, 2.1.7, 2.2.3. (whitequark)
579
-
580
- Bugs fixed:
581
- * Source::Map: do not include :node in to_hash. (whitequark)
582
- * ruby{20,21,22}.y: "p ->() do a() do end end": save cmdarg. (whitequark)
583
-
584
- v2.2.2.2 (2015-04-28)
585
- ---------------------
586
-
587
- Bugs fixed:
588
- * lexer.rl: "%r.\..", "%r'\''": leave regexp metacharacters escaped (fixes #192). (whitequark)
589
-
590
- v2.2.2.1 (2015-04-18)
591
- ---------------------
592
-
593
- Bugs fixed:
594
- * builders/default: don't falsely diagnose multiline regexps (fixes #190). (whitequark)
595
-
596
- v2.2.0.4 (2015-04-15)
597
- ---------------------
598
-
599
- Features implemented:
600
- * Add Parser::Source::Map#node. (whitequark)
601
- * Add Parser::Source::Comment.associate_locations. (kubicle)
602
-
603
- v2.2.0.1 (2014-12-27)
604
- ---------------------
605
-
606
- Bugs fixed:
607
- * lexer.rl, lexer/literal: "{'a'::": don't parse as quoted label. (Peter Zotov)
608
- * Update syntax deviation warning to reflect 2.2 release. (Peter Zotov)
609
-
610
- v2.2.0 (2014-12-25)
611
- -------------------
612
-
613
- Bugs fixed:
614
- * lexer.rl: "{'x':1,'y':{}}": fix lex_state after tLABEL_END. (Peter Zotov)
615
-
616
- v2.2.0.pre.8 (2014-11-19)
617
- -------------------------
618
-
619
- API modifications:
620
- * parser/current: update 2.1 to 2.1.5 (fixes #174). (Peter Zotov)
621
-
622
- v2.2.0.pre.7 (2014-11-03)
623
- -------------------------
624
-
625
- Bugs fixed:
626
- * parser/meta: add missing nodes (fixes #171). (Peter Zotov)
627
-
628
- v2.2.0.pre.6 (2014-10-28)
629
- -------------------------
630
-
631
- API modifications:
632
- * parser/current: latest stable 2.1.x is 2.1.4, update warning. (hirocaster)
633
-
634
- v2.2.0.pre.5 (2014-10-03)
635
- -------------------------
636
-
637
- Features implemented:
638
- * parser/current: add syntax deviation warning for 2.1.2. (Peter Zotov)
639
- * lexer.rl, ruby22.y: "{'x':1}": add tLABEL_END. (Peter Zotov)
640
-
641
- Bugs fixed:
642
- * lexer.rl, ruby{21,22}.y: "def a b:\nreturn": fix #164. (Peter Zotov)
643
- * Fix for `ruby-rewrite` not rewriting files if any rewriter was loaded, due to it getting confused about the filename. (Jon Frisby)
644
-
645
- v2.2.0.pre.4 (2014-08-09)
646
- -------------------------
647
-
648
- Bugs fixed:
649
- * builders/default: "not(x)": fix source map (fixes #158). (Peter Zotov)
650
-
651
- v2.2.0.pre.3 (2014-07-02)
652
- -------------------------
653
-
654
- Features implemented:
655
- * Raise EncodingError when source includes invalid byte sequence (Yuji Nakayama)
656
-
657
- Bugs fixed:
658
- * ruby{19,20,21}.y: "x def y; z do end end": save cmdarg stack to isolate command argument state from outer scope. (Peter Zotov)
659
- * ruby{19,20,21}.y: "tap (proc do end)": allow parenthesed do-block in cmdarg. (Peter Zotov)
660
-
661
- v2.2.0.pre.2 (2014-06-14)
662
- -------------------------
663
-
664
- Bugs fixed:
665
- * ruby22.rb: include in gemspec. (Peter Zotov)
666
-
667
- v2.2.0.pre.1 (2014-06-12)
668
- -------------------------
669
-
670
- Features implemented:
671
- * Add Source::Rewriter#transaction for atomic rewrite actions (Yuji Nakayama)
672
- * Raise Parser::ClobberingError for clobbering rewrite error (Yuji Nakayama)
673
-
674
- Bugs fixed:
675
- * parser/current: fix the fallback case (refs #146). (Peter Zotov)
676
- * ruby22.y: "tap (proc do end)": allow parenthesed do-block in cmdarg. (Peter Zotov)
677
-
678
- v2.1.9 (2014-04-21)
679
- -------------------
680
-
681
- API modifications:
682
- * Extend ast dependency to >= 1.1 \< 3.0. (Peter Zotov)
683
- * parser/current: fallback to latest released Ruby instead of raising (fixes #140). (Peter Zotov)
684
-
685
- Features implemented:
686
- * ruby-rewrite: add a --modify switch for rewriters that modify AST (fixes #143). (Peter Zotov)
687
-
688
- Bugs fixed:
689
- * lexer.rl: don't fail to parse string literals in huge files (fixes #142). (Peter Zotov)
690
-
691
- v2.1.7 (2014-03-05)
692
- -------------------
693
-
694
- Bugs fixed:
695
- * lexer.rl: make sure all invalid escapes lead to fatal errors (fixes #136). (Peter Zotov)
696
-
697
- v2.1.6 (2014-03-04)
698
- -------------------
699
-
700
- Features implemented:
701
- * Add the list of all node types within Parser::Meta. (Markus Schirp)
702
-
703
- v2.1.5 (2014-02-24)
704
- -------------------
705
-
706
- Bugs fixed:
707
- * Parser::Base, ruby18.y: don't try to lookup Encoding on 1.8 (fixes #133). (Peter Zotov)
708
-
709
- v2.1.4 (2014-01-11)
710
- -------------------
711
-
712
- Features implemented:
713
- * ruby22.y: "x def y; z do end end": save cmdarg stack to isolate command argument state from outer scope. (Peter Zotov)
714
- * Add Ruby 2.2 syntax. (Peter Zotov)
715
-
716
- Bugs fixed:
717
- * Builders::Default: "super do end": super and zsuper are like send (fixes #131). (Peter Zotov)
718
-
719
- v2.1.3 (2014-01-10)
720
- -------------------
721
-
722
- Bugs fixed:
723
- * lexer.rl: "/\//": don't include escaped delimiter in AST in its escaped form (fixes #125). (Peter Zotov)
724
- * Builders::Default: "return x y do end": correctly build AST for keywords followed by command (closes #129). (Peter Zotov)
725
- * Fix a bug where "ambiguous first argument" diagnostic was not emitted (Yuji Nakayama)
726
- * Source::Comment::Associator: don't die while associating with "__ENCODING__". (Peter Zotov)
727
- * ruby-parse: don't die when invoked with -L -e "__ENCODING__". (Peter Zotov)
728
- * Add missing source map for match-current-line (Yuji Nakayama)
729
-
730
- v2.1.2 (2014-01-05)
731
- -------------------
732
-
733
- Bugs fixed:
734
- * lexer.rl: in "foo!= x", foo is tIDENTIFIER, not tFID (closes #126). (Peter Zotov)
735
-
736
- v2.1.1 (2013-12-25)
737
- -------------------
738
-
739
- API modifications:
740
- * ruby21.y: Ruby 2.1 is released already. (Peter Zotov)
741
-
742
- v2.1.0 (2013-12-25)
743
- -------------------
744
-
745
- API modifications:
746
- * Parser::Diagnostic: expose reason symbolically (closes #115, #116). (Ian MacLeod)
747
- * lexer.rl: coerce literals to UTF-8 in ASCII-encoded files if they contain \uXXXX (Peter Zotov)
748
-
749
- Bugs fixed:
750
- * builders/default: represent heredocs with dedicated map (fixes #100). (Peter Zotov)
751
-
752
- v2.1.0.pre1 (2013-11-12)
753
- ------------------------
754
-
755
- API modifications:
756
- * lexer.rl: correctly handle __END__ with non-whitespace after it (Peter Zotov)
757
- * lexer.rl: handle \r in middle of a line as mere whitespace (Peter Zotov)
758
- * ruby{18,19,20,21}.y, builders/default: precisely point to tUMINUS_NUM. (Peter Zotov)
759
-
760
- Features implemented:
761
- * lexer.rl, ruby21.y, builders/default: rational/complex literals. (Peter Zotov)
762
-
763
- v2.0.0 (2013-10-06)
764
- -------------------
765
-
766
- API modifications:
767
- * Source::Rewriter: raise an exception if updates clobber each other. (Peter Zotov)
768
- * Source::Range#inspect: use full class name. (Peter Zotov)
769
- * lexer.rl: make EOF tokens actually pointing at EOF and zero-length. (Peter Zotov)
770
- * Source::Range#column_range: raise RangeError if range spans >1 line. (Peter Zotov)
771
- * Source::Comment::Associator: fix argument order. (Peter Zotov)
772
-
773
- Features implemented:
774
- * Source::Comment: implement #inspect. (Peter Zotov)
775
- * Backport Array#bsearch from Ruby 2.0. (Peter Zotov)
776
-
777
- v2.0.0.pre8 (2013-09-15)
778
- ------------------------
779
-
780
- API modifications:
781
- * lexer.rl: make lexing faster and improve parsing speed by ~60%. (Peter Zotov)
782
-
783
- v2.0.0.pre7 (2013-09-10)
784
- ------------------------
785
-
786
- Features implemented:
787
- * Parser::Base: add #parse_with_comments, #parse_file_with_comments. (Trent Ogren)
788
- * lexer.rl (Ruby 2.1): "1end": lex non-exponent `e' separate from number. (Peter Zotov)
789
-
790
- Bugs fixed:
791
- * lexer.rl: "->*{}": tLAMBEG at expr_beg (fixes #103). (Peter Zotov)
792
- * Source::Rewriter: apply actions in the insertion order. (Josh Cheek)
793
-
794
- v2.0.0.pre5 (2013-07-31)
795
- ------------------------
796
-
797
- Bugs fixed:
798
- * Remove a forgotten require. (Peter Zotov)
799
-
800
- v2.0.0.pre4 (2013-07-31)
801
- ------------------------
802
-
803
- API modifications:
804
- * source/comment: make #loc/#location return Source::Map for consistency (fixes #96). (Peter Zotov)
805
-
806
- Features implemented:
807
- * source/comment/associator: skip shebang and encoding line by default (fixes #95). (Peter Zotov)
808
-
809
- Bugs fixed:
810
- * ruby{19,20,21}.y, lexer.rl, builders/default: correct begin for ?a (fixes #92). (Peter Zotov)
811
- * ruby{18,19,20,21}.y, builders/default: don't add spurious begin/end for string parts (refs #92). (Peter Zotov)
812
- * Activate `diagnostics.all_errors_are_fatal` on non-MRI Rubies as a workaround (closes #93). (Peter Zotov)
813
-
814
- v2.0.0.pre3 (2013-07-26)
815
- ------------------------
816
-
817
- API modifications:
818
- * lexer.rl: add simple explicit output encoding for strings. (Peter Zotov)
819
-
820
- Features implemented:
821
- * Source::Buffer: support for -(dos|unix|mac) and utf8-mac encodings. (Peter Zotov)
822
- * Source::Range#resize. (Peter Zotov)
823
- * Significantly improve speed for large (>100k) and very large (>1M) files. (Peter Zotov)
824
-
825
- Bugs fixed:
826
- * ruby21.y: fix typos. (Peter Zotov)
827
- * builders/default: respect regexp encoding. (Peter Zotov)
828
- * lexer.rl: literal EOF (\0, \x04, \x1a) inside literals and comments. (Peter Zotov)
829
- * lexer.rl: "meth (lambda do end)" (1.8), "f x: -> do meth do end end": expr_cmdarg. (Peter Zotov)
830
- * lexer.rl: "\<\<E\nE\r\r\n": extraneous CRs are ignored after heredoc delimiter. (Peter Zotov)
831
- * lexer.rl: "%\nfoo\n": \n can be used as %-literal delimiter. (Peter Zotov)
832
- * source/buffer, lexer.rl: convert CRLF to LF prior to lexing. (Peter Zotov)
833
- * lexer.rl: "\<\<w; "\nfoo\nw\n"": interleaved heredoc and non-heredoc literals. (Peter Zotov)
834
- * builders/default: 1.8 did not descend into &&/|| in conditional context. (Peter Zotov)
835
- * lexer.rl: "1+a:a": respect context sensitivity in 1.8 label fallback. (Peter Zotov)
836
- * lexer.rl: ruby 1.8 is context-sensitive wrt/ locals as well. (Peter Zotov)
837
- * lexer.rl: "eof??a": expr_arg doesn't need space before character literal. (Peter Zotov)
838
- * lexer.rl: interleaved heredoc and interpolated double-quoted string. (Peter Zotov)
839
- * lexer.rl: "#{f:a}": interpolation starts expr_value, not expr_beg. (Peter Zotov)
840
- * lexer.rl: "\cM" is "\r", not an error. (Peter Zotov)
841
- * ruby{20,21}.y: constant op-assignment inside a def is not an error. (Peter Zotov)
842
- * lexer.rl: "when Date:" fix label fallback for 1.8 mode. (Peter Zotov)
843
- * ruby{19,20,21}.y: "->(scope){}; scope :foo": lambda identifier leakage. (Peter Zotov)
844
- * lexer.rl: "eh ?\r\n": don't eat tEH if followed by CRLF. (Peter Zotov)
845
- * lexer.rl: "f \<\<-TABLE\ndo |a,b|\nTABLE\nend": leave FSM after lexing heredoc. (Peter Zotov)
846
- * lexer.rl: "foo %\n bar": don't % at expr_arg as tSTRING_BEG. (Peter Zotov)
847
- * lexer.rl, lexer/literal: use lexer encoding for literal buffer. (Peter Zotov)
848
- * lexer.rl: "\u{9}": one-digit braced unicode escapes. (Peter Zotov)
849
- * Source::Buffer: don't chew \r from source lines. (Peter Zotov)
850
- * builders/default: don't die in eh_keyword_map if else branch is empty. (Peter Zotov)
851
- * lexer.rl: "0777_333": octal literals with internal underscores. (Peter Zotov)
852
- * lexer.rl: "let [] {}": goto tLBRACE_ARG after any closing braces. (Peter Zotov)
853
- * lexer.rl: "while not (1) do end": emit proper kDO* when in cond/cmdarg state. (Peter Zotov)
854
- * lexer.rl: "rescue=>": correctly handle rescue+assoc at expr_beg. (Peter Zotov)
855
- * lexer.rl: "puts 123do end": only trailing `_' and `e' in number are errors. (Peter Zotov)
856
- * lexer.rl: "begin; rescue rescue1; end": accept barewords at expr_mid. (Peter Zotov)
857
- * lexer.rl: "f.x!if 1": correct modifier handling in expr_arg. (Peter Zotov)
858
- * lexer.rl: "=begin\n#=end\n=end": only recognize =end at bol. (Peter Zotov)
859
- * builders/default: don't check for duplicate arguments in 1.8 mode. (Peter Zotov)
860
- * Don't attempt to parse magic encoding comment in 1.8 mode. (Peter Zotov)
861
- * lexer.rl: "\777": octal literals overflow. (Peter Zotov)
862
- * lexer.rl: "foo;\n__END__", "\na:b": whitespace in expr_value. (Peter Zotov)
863
- * lexer.rl: "\xE2\x80\x99": concatenation of byte escape sequences. (Peter Zotov)
864
- * lexer.rl: "E10", "E4U": don't conflate floats and identifiers. (Peter Zotov)
865
- * lexer.rl: "foo.bar= {1=>2}": return fid, = as separate tokens in expr_dot. (Peter Zotov)
866
- * lexer.rl: "def defined?": properly return defined? in expr_fname. (Peter Zotov)
867
- * lexer.rl: "Rainbows! do end", "foo.S?": allow bareword fid in expr_beg/dot. (Peter Zotov)
868
-
869
- v2.0.0.pre2 (2013-07-11)
870
- ------------------------
871
-
872
- Features implemented:
873
- * Allow to differentiate between __FILE__/__LINE__ and literals (closes #89). (Peter Zotov)
874
- * Add attribute `diagnostic' to Parser::SyntaxError (closes #88). (Peter Zotov)
875
-
876
- Bugs fixed:
877
- * Don't treat byte order mark as an identifier (closes #91). (Peter Zotov)
878
-
879
- v2.0.0.beta10 (2013-07-02)
880
- --------------------------
881
-
882
- Bugs fixed:
883
- * ruby-parse, ruby-rewrite: fix require of removed compatibility shim. (Peter Zotov)
884
- * lexer.rl: "def !@; end" unary bang. (Peter Zotov)
885
-
886
- v2.0.0.beta9 (2013-06-28)
887
- -------------------------
888
-
889
- API modifications:
890
- * ruby{18,19,20,21}.y: removed obsolete warnings and linting. (Peter Zotov)
891
-
892
- Features implemented:
893
- * builders/default: add keyword source range for BEGIN/END (fixes #85). (Peter Zotov)
894
-
895
- Bugs fixed:
896
- * lexer.rl: "t=1;(a)?t:T" context sensitivity in expr_value (fixes #87). (Peter Zotov)
897
- * lexer.rl: keywords as labels, e.g. "unless:" (fixes #83, #84). (Peter Zotov)
898
- * lexer.rl: rectify usage of c_space/c_space_nl (fixes #81). (Peter Zotov)
899
- * ruby{18,19,20,21}.y: fix warnings for class/module in method body. (Peter Zotov)
900
- * lexer.rl: fix warning for ?\s. (Peter Zotov)
901
- * lexer.rl: expr_fname emits expr_beg-like keywords (fixes #82). (Peter Zotov)
902
- * lexer.rl: get rid of harmful nondeterminism in w_space (fixes #80). (Peter Zotov)
903
- * lexer/explanation: 1.8, 1.9 compatibility (fixes #76). (Peter Zotov)
904
-
905
- v2.0.0.beta8 (2013-06-24)
906
- -------------------------
907
-
908
- Bugs fixed:
909
- * ast/processor: add missing node handlers (Yuji Nakayama)
910
- * ast/processor: rename some obsolete node handlers (Yuji Nakayama)
911
-
912
- v2.0.0.beta7 (2013-06-22)
913
- -------------------------
914
-
915
- API modifications:
916
- * Implement a much more sane encoding model (closes #60). (Peter Zotov)
917
-
918
- Features implemented:
919
- * builders/default: (while-post) and (until-post); (kwbegin) (fixes #70). (Peter Zotov)
920
-
921
- Bugs fixed:
922
- * builders/default: don't swallow (begin) in "if (foo); end" (fixes #75). (Peter Zotov)
923
-
924
- v2.0.0.beta6 (2013-06-17)
925
- -------------------------
926
-
927
- API modifications:
928
- * Get rid of "synthesized (nil)". If it's not in source, it's not in AST (fixes #71). (Peter Zotov)
929
- * lexer.rl, ruby{18,19,20,21}.y: source maps for interpolation (fixes #27). (Peter Zotov)
930
-
931
- Features implemented:
932
- * ruby{18,19,20,21}.y, builders/default: lvar-injecting match (closes #69). (Peter Zotov)
933
- * builders/default: implicit matches (refs #69). (Peter Zotov)
934
- * builders/default: flip-flops (refs #69). (Peter Zotov)
935
-
936
- Bugs fixed:
937
- * lexer.rl: fix an off-by-1 error in heredoc parsing. (Peter Zotov)
938
- * lexer.rl: don't fail on "alias $a $b\n# comment\nalias $c $d". (Peter Zotov)
939
- * builders/default: fix treatment of masgn in &&/|| (refs #69). (Peter Zotov)
940
- * ruby-parse: make -L command line option work again. (Peter Zotov)
941
- * ruby{18,19,20,21}.y: begin source map for "if foo\nthen bar end" (fixes #68). (Peter Zotov)
942
- * Source::Comment::Associator: gracefully terminate when out of comments (fixes #67). (Peter Zotov)
943
-
944
- v2.0.0.beta5 (2013-06-08)
945
- -------------------------
946
-
947
- Bugs fixed:
948
- * Source::Buffer: better magic encoding comment recognition (fixes #65). (Peter Zotov)
949
- * lexer.rl: "{success?: true}" (fixes #66). (Peter Zotov)
950
- * Source::Buffer: if in doubt, treat data as UTF-8 (closes #60). (Peter Zotov)
951
-
952
- v2.0.0.beta4 (2013-06-05)
953
- -------------------------
954
-
955
- Bugs fixed:
956
- * lexer.rl: fix heredoc parsing with CRLF line endings (closes #61). (Peter Zotov)
957
- * lexer.rl: fix premature ending of heredoc "\<\<D\nABCDEF\nD" (fixes #59). (Peter Zotov)
958
-
959
- v2.0.0.beta3 (2013-05-29)
960
- -------------------------
961
-
962
- Bugs fixed:
963
- * AST::Processor: traverse "A, B = foo" (fixes #55). (Peter Zotov)
964
- * lexer.rl: correctly handle CRLF line endings (fixes #56). (Peter Zotov)
965
- * Fix traversing of "case; when a?; when b?; end" by AST::Processor. (Peter Zotov)
966
- * Correctly lex "foo a, b # comment\nbar" (fixes #54). (Peter Zotov)
967
-
968
- v2.0.0.beta2 (2013-05-27)
969
- -------------------------
970
-
971
- Bugs fixed:
972
- * Actually return comments from Parser::Base#tokenize instead of nil. (Peter Zotov)
973
-
974
- v2.0.0.beta1 (2013-05-25)
975
- -------------------------
976
-
977
- API modifications:
978
- * Completely rewrite whitespace handling in lexer (fixes #36). (Peter Zotov)
979
- * Rename Parser::AST::Node#source_map to #location, #src to #loc (closes #40). (Peter Zotov)
980
- * Rename Parser::Source::Range#to_source to #source (refs #40). (Peter Zotov)
981
- * Rename (cdecl) node to (casgn), remove (cvdecl) nodes (fixes #26). (Peter Zotov)
982
-
983
- Features implemented:
984
- * Add Source::Comment.associate for mapping comments back to nodes (fixes #31). (Peter Zotov)
985
- * Return AST and comments from Parser::Base#parse_with_comments. (Peter Zotov)
986
- * Return comments from Parser::Base#tokenize (fixes #46). (Peter Zotov)
987
- * Add tokenizer, Parser::Base#tokenize (refs #46). (Peter Zotov)
988
- * lexer.rl: better location reporting for invalid unicode codepoints (fixes #38). (Peter Zotov)
989
- * lexer.rl: better location reporting for unterminated =begin (fixes #37). (Peter Zotov)
990
- * Better location reporting for hashes with labels. (Peter Zotov)
991
- * Add `dot' source map to (send) nodes (fixes #34). (Peter Zotov)
992
- * Significantly improve performance of Source::Buffer (fixes #28). (Peter Zotov)
993
-
994
- Bugs fixed:
995
- * lexer.rl: fix lexing label at line_begin "foo:bar" (fixes #48). (Peter Zotov)
996
- * lexer.rl: "Option /^I/" is a method call (fixes #32). (Peter Zotov)
997
- * Don't allow destructive mutation of line cache in Source::Buffer. (Peter Zotov)
998
- * Fix quantifier in magic encoding parser (refs #33). (Peter Zotov)
999
- * Better handling of magic encoding comment edge cases (fixes #33). (Peter Zotov)
1000
-
1001
- v1.3.2 (2013-05-13)
1002
- -------------------
1003
-
1004
- Features implemented:
1005
- * lexer.rl: disallow "$-" (dollar, dash, no character) special. (Peter Zotov)
1006
-
1007
- Bugs fixed:
1008
- * Source::Range: fix #to_source for multiline ranges. (Peter Zotov)
1009
- * builders/default: source map for class/module name (fixes #24). (Peter Zotov)
1010
-
1011
- v1.3.1 (2013-05-09)
1012
- -------------------
1013
-
1014
- Bugs fixed:
1015
- * ruby{19,20,21}.y: "def foo\n=begin\n=end\nend" (fixes #22). (Peter Zotov)
1016
- * lexer.rl: "rescue::Exception" (fixes #23). (Peter Zotov)
1017
-
1018
- v1.3.0 (2013-04-26)
1019
- -------------------
1020
-
1021
- Bugs fixed:
1022
- * lexer.rl: "alias foo bar \n alias bar baz". (Peter Zotov)
1023
-
1024
- v1.2.0 (2013-04-25)
1025
- -------------------
1026
-
1027
- Bugs fixed:
1028
- * lexer.rl: lex "def String.foo; end" correctly (fixes #16). (Peter Zotov)
1029
- * lexer.rl: reject "1end", "1.1end". (Peter Zotov)
1030
-
1031
- v1.1.0 (2013-04-18)
1032
- -------------------
1033
-
1034
- API modifications:
1035
- * ruby19.y, ruby20.y, ruby21.y: check for Encoding support (fixes #9). (Peter Zotov)
1036
-
1037
- Features implemented:
1038
- * builders/default: ignore duplicate _ args (>=1.9), _.* args (>1.9) (fixes #5). (Peter Zotov)
1039
- * builders/default: detect duplicate argument names (refs #5). (Peter Zotov)
1040
- * lexer.rl: "def foo bar: 1; end" (for ruby 2.1) (fixes #15). (Peter Zotov)
1041
- * ruby21.y: required keyword arguments. (Peter Zotov)
1042
-
1043
- Bugs fixed:
1044
- * ruby20.y, ruby21.y: "foo::A += 1" and friends (scoped constant op-asgn). (Peter Zotov)
1045
-
1046
- v1.0.1 (2013-04-18)
1047
- -------------------
1048
-
1049
- Bugs fixed:
1050
- * builders/default: %Q{#{1}} and friends (fixes #14). (Peter Zotov)
1051
-
1052
- v1.0.0 (2013-04-17)
1053
- -------------------
1054
-
1055
- Features implemented:
1056
- * ruby20.y: "meth 1 do end.fun(bar) {}" and friends. (Peter Zotov)
1057
- * ruby20.y: keyword arguments. (Peter Zotov)
1058
- * ruby20.y: { **kwsplat }. (Peter Zotov)
1059
-
1060
- v0.9.2 (2013-04-16)
1061
- -------------------
1062
-
1063
- Features implemented:
1064
- * lexer.rl: "-> (a) {}". (Peter Zotov)
1065
- * builders/default: treat &&/|| lhs/rhs as conditional context. (Peter Zotov)
1066
- * ruby20.y: "class Foo \< a:b; end". (Peter Zotov)
1067
- * lexer.rl: "class \<\< a:b". (Peter Zotov)
1068
- * ruby19.y, ruby20.y: "f { || a:b }". (Peter Zotov)
1069
- * ruby19.y, ruby20.y: "def foo() a:b end", "def foo\n a:b end". (Peter Zotov)
1070
- * lexer.rl: %i/%I. (Peter Zotov)
1071
- * lexer.rl: warn at "foo **bar". (Peter Zotov)
1072
- * lexer.rl: ** at expr_beg is tDSTAR. (Peter Zotov)
1073
- * ruby20.y: "f {|;\nvar\n|}". (Peter Zotov)
1074
- * ruby20.y: "p () {}". (Peter Zotov)
1075
- * ruby20.y: "p begin 1.times do 1 end end". (Peter Zotov)
1076
- * ruby20.y: better error message for BEGIN{} in a method body. (Peter Zotov)
1077
-
1078
- Bugs fixed:
1079
- * lexer.rl, ruby18.y, ruby19.y, ruby20.y: "%W[#{a}#@b foo #{c}]". (Peter Zotov)
1080
- * lexer.rl: parse "foo=1; foo / bar #/" as method call on 1.8, division on 1.9. (Peter Zotov)
1081
- * ruby18.y, ruby19.y: BEGIN{} does not introduce a scope. (Peter Zotov)
1082
- * lexer.rl: improve whitespace handling. (Peter Zotov)
1083
-
1084
- v0.9.0 (2013-04-15)
1085
- -------------------
1086
-
1087
- API modifications:
1088
- * runtime compatibility with 1.8.7. (Peter Zotov)
1089
-
1090
- Features implemented:
1091
- * builders/default: check for multiple assignment in conditions (fixes #4). (Peter Zotov)
1092
- * builders/default: check if actual block and blockarg are passed (fixes #6). (Peter Zotov)
1093
- * ruby19.y: "foo::A += m foo". (Peter Zotov)
1094
- * ruby18.y, ruby19.y: "rescue without else is useless" warning. (Peter Zotov)
1095
- * ruby19.y: 99.16% coverage, 100% sans error recovery. (Peter Zotov)
1096
- * ruby19.y: mlhs arguments "def foo((a, *, p)) end". (Peter Zotov)
1097
- * ruby19.y: "fun (1) {}" and friends. (Peter Zotov)
1098
- * ruby19.y: mlhs post variables "a, *b, c = ...". (Peter Zotov)
1099
- * builders/default: @@a |= 1; def f; @@a |= 1; end. (Peter Zotov)
1100
- * ruby18.y: fun (&foo). (Peter Zotov)
1101
- * ruby18.y: block formal arguments. 99.33% coverage. (Peter Zotov)
1102
- * ruby18.y: fun(meth 1 do end); fun(1, meth 1 do end). (Peter Zotov)
1103
- * ruby18.y: "meth 1 do end.fun(bar)" and friends. (Peter Zotov)
1104
- * ruby18.y: foo () {}; a.foo () {}; a::foo () {}. (Peter Zotov)
1105
- * ruby18.y: various call argument combinations. (Peter Zotov)
1106
- * ruby18.y: foo (1, 2); foo (). (Peter Zotov)
1107
- * ruby18.y: foo (1).to_i. (Peter Zotov)
1108
- * ruby18.y: fun{}; fun(){}; fun(1){}; fun do end. (Peter Zotov)
1109
- * ruby18.y: foo.fun bar. (Peter Zotov)
1110
- * lexer.rl, ruby18.y: add support for cond/cmdarg stack states. (Peter Zotov)
1111
- * ruby18.y: rescue. (Peter Zotov)
1112
- * ruby18.y: begin end while|until (tests only). (Peter Zotov)
1113
- * ruby18.y: case. (Peter Zotov)
1114
- * ruby18.y: foo[m bar]. (Peter Zotov)
1115
- * ruby18.y: for..in. (Peter Zotov)
1116
-
1117
- Bugs fixed:
1118
- * lexer.rl: handle : at expr_beg as a symbol, at expr_end as tCOLON. (Peter Zotov)
1119
- * lexer.rl: handle "rescue #foo\nbar". (Peter Zotov)
1120
- * lexer.rl: handle "foo.#bar\nbaz". (Peter Zotov)
1121
- * lexer.rl: fix location info for symbols. (Peter Zotov)
1122
- * lexer.rl: handle \<backslash>\<nl> at expr_beg. (Peter Zotov)
1123
- * lexer.rl: emit tCONSTANT/tIDENTIFIER/tFID in expr_dot. (Peter Zotov)
1124
- * lexer.rl: correctly disambiguate "x ::Foo" as tIDENT, tCOLON3, ... (Peter Zotov)
1125
- * lexer.rl: correctly disambiguate ident!= as tIDENTIFIER, tNEQ. (Peter Zotov)
1126
- * lexer.rl: correctly report the %r%% tREGEXP_BEG value as %r%. (Peter Zotov)
1127
- * ruby19.y: emit correct error on "nil = 1" and friends. (Peter Zotov)
1128
- * ruby19.y: 1.9 permits empty symbol literals. (Peter Zotov)
1129
- * ruby18.y: foo(&bar). (Peter Zotov)
1130
- * lexer.rl: don't lookahead two tokens on "func %{str} do". (Peter Zotov)
1131
- * lexer.rl: fix lexing of non-interp heredoc with trailing backslash. (Peter Zotov)
1132
- * lexer.rl: fix erroneous number and =begin lookahead in expr_beg. (Peter Zotov)
1133
- * lexer.rl: fix stack corruption. (Peter Zotov)
1134
- * lexer.rl: /= at expr_beg. (Peter Zotov)
1135
- * lexer.rl: class\<\<self. (Peter Zotov)
1136
- * fix lexing comments at expr_beg "{#1\n}". (Peter Zotov)
1137
-