parser 2.5.1.0 → 3.0.1.1

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