parser 2.7.1.4 → 3.0.1.1

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