prism 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -1
  3. data/Makefile +6 -0
  4. data/README.md +2 -0
  5. data/config.yml +21 -20
  6. data/docs/configuration.md +2 -0
  7. data/docs/javascript.md +90 -0
  8. data/docs/releasing.md +27 -0
  9. data/docs/ruby_api.md +2 -0
  10. data/ext/prism/api_node.c +66 -68
  11. data/ext/prism/extension.c +73 -0
  12. data/ext/prism/extension.h +1 -1
  13. data/include/prism/ast.h +40 -40
  14. data/include/prism/defines.h +9 -0
  15. data/include/prism/enc/pm_encoding.h +1 -0
  16. data/include/prism/node.h +0 -17
  17. data/include/prism/parser.h +1 -0
  18. data/include/prism/prettyprint.h +15 -0
  19. data/include/prism/util/pm_buffer.h +10 -4
  20. data/include/prism/util/pm_constant_pool.h +1 -1
  21. data/include/prism/util/pm_newline_list.h +1 -1
  22. data/include/prism/version.h +3 -3
  23. data/include/prism.h +11 -11
  24. data/lib/prism/compiler.rb +0 -3
  25. data/lib/prism/debug.rb +20 -6
  26. data/lib/prism/desugar_compiler.rb +1 -1
  27. data/lib/prism/dispatcher.rb +0 -14
  28. data/lib/prism/dsl.rb +8 -13
  29. data/lib/prism/ffi.rb +25 -0
  30. data/lib/prism/lex_compat.rb +1 -1
  31. data/lib/prism/mutation_compiler.rb +3 -8
  32. data/lib/prism/node.rb +123 -159
  33. data/lib/prism/node_ext.rb +23 -16
  34. data/lib/prism/parse_result.rb +21 -5
  35. data/lib/prism/pattern.rb +3 -3
  36. data/lib/prism/serialize.rb +901 -305
  37. data/lib/prism/visitor.rb +0 -3
  38. data/prism.gemspec +8 -1
  39. data/rbi/prism.rbi +7261 -0
  40. data/rbi/prism_static.rbi +182 -0
  41. data/sig/prism.rbs +4439 -0
  42. data/sig/prism_static.rbs +110 -0
  43. data/src/enc/pm_unicode.c +1 -1
  44. data/src/node.c +28 -29
  45. data/src/prettyprint.c +7674 -1647
  46. data/src/prism.c +353 -300
  47. data/src/regexp.c +2 -0
  48. data/src/serialize.c +392 -381
  49. data/src/util/pm_buffer.c +47 -12
  50. data/src/util/pm_constant_pool.c +1 -1
  51. data/src/util/pm_newline_list.c +8 -54
  52. metadata +9 -2
@@ -21,8 +21,8 @@ end
21
21
  module Prism
22
22
  module Serialize
23
23
  MAJOR_VERSION = 0
24
- MINOR_VERSION = 15
25
- PATCH_VERSION = 1
24
+ MINOR_VERSION = 16
25
+ PATCH_VERSION = 0
26
26
 
27
27
  def self.load(input, serialized)
28
28
  input = input.dup
@@ -54,14 +54,33 @@ module Prism
54
54
  @constant_pool = nil
55
55
 
56
56
  @source = source
57
+ define_load_node_lambdas unless RUBY_ENGINE == 'ruby'
58
+ end
59
+
60
+ def load_header
61
+ raise "Invalid serialization" if io.read(5) != "PRISM"
62
+ raise "Invalid serialization" if io.read(3).unpack("C3") != [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION]
63
+ only_semantic_fields = io.read(1).unpack1("C")
64
+ unless only_semantic_fields == 0
65
+ raise "Invalid serialization (location fields must be included but are not)"
66
+ end
57
67
  end
58
68
 
59
69
  def load_encoding
60
70
  Encoding.find(io.read(load_varint))
61
71
  end
62
72
 
73
+ def load_force_encoding
74
+ @encoding = load_encoding
75
+ @input = input.force_encoding(@encoding).freeze
76
+ end
77
+
78
+ def load_comments
79
+ load_varint.times.map { Comment.new(Comment::TYPES.fetch(load_varint), load_location) }
80
+ end
81
+
63
82
  def load_metadata
64
- comments = load_varint.times.map { Comment.new(Comment::TYPES.fetch(load_varint), load_location) }
83
+ comments = load_comments
65
84
  magic_comments = load_varint.times.map { MagicComment.new(load_location, load_location) }
66
85
  errors = load_varint.times.map { ParseError.new(load_embedded_string, load_location) }
67
86
  warnings = load_varint.times.map { ParseWarning.new(load_embedded_string, load_location) }
@@ -95,15 +114,8 @@ module Prism
95
114
  end
96
115
 
97
116
  def load_nodes
98
- raise "Invalid serialization" if io.read(5) != "PRISM"
99
- raise "Invalid serialization" if io.read(3).unpack("C3") != [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION]
100
- only_semantic_fields = io.read(1).unpack1("C")
101
- unless only_semantic_fields == 0
102
- raise "Invalid serialization (location fields must be included but are not)"
103
- end
104
-
105
- @encoding = load_encoding
106
- @input = input.force_encoding(@encoding).freeze
117
+ load_header
118
+ load_force_encoding
107
119
 
108
120
  comments, magic_comments, errors, warnings = load_metadata
109
121
 
@@ -201,300 +213,884 @@ module Prism
201
213
  load_constant(index - 1) if index != 0
202
214
  end
203
215
 
204
- def load_node
205
- type = io.getbyte
206
- location = load_location
216
+ if RUBY_ENGINE == 'ruby'
217
+ def load_node
218
+ type = io.getbyte
219
+ location = load_location
207
220
 
208
- case type
209
- when 1 then
210
- AliasGlobalVariableNode.new(load_node, load_node, load_location, location)
211
- when 2 then
212
- AliasMethodNode.new(load_node, load_node, load_location, location)
213
- when 3 then
214
- AlternationPatternNode.new(load_node, load_node, load_location, location)
215
- when 4 then
216
- AndNode.new(load_node, load_node, load_location, location)
217
- when 5 then
218
- ArgumentsNode.new(Array.new(load_varint) { load_node }, location)
219
- when 6 then
220
- ArrayNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
221
- when 7 then
222
- ArrayPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
223
- when 8 then
224
- AssocNode.new(load_node, load_optional_node, load_optional_location, location)
225
- when 9 then
226
- AssocSplatNode.new(load_optional_node, load_location, location)
227
- when 10 then
228
- BackReferenceReadNode.new(load_required_constant, location)
229
- when 11 then
230
- BeginNode.new(load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location, location)
231
- when 12 then
232
- BlockArgumentNode.new(load_optional_node, load_location, location)
233
- when 13 then
234
- BlockLocalVariableNode.new(load_required_constant, location)
235
- when 14 then
236
- BlockNode.new(Array.new(load_varint) { load_required_constant }, load_optional_node, load_optional_node, load_location, load_location, location)
237
- when 15 then
238
- BlockParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
239
- when 16 then
240
- BlockParametersNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
241
- when 17 then
242
- BreakNode.new(load_optional_node, load_location, location)
243
- when 18 then
244
- CallAndWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
245
- when 19 then
246
- CallNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, load_varint, load_required_constant, location)
247
- when 20 then
248
- CallOperatorWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_required_constant, load_location, load_node, location)
249
- when 21 then
250
- CallOrWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
251
- when 22 then
252
- CapturePatternNode.new(load_node, load_node, load_location, location)
253
- when 23 then
254
- CaseNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_location, load_location, location)
255
- when 24 then
256
- ClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_location, load_required_constant, location)
257
- when 25 then
258
- ClassVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
259
- when 26 then
260
- ClassVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
261
- when 27 then
262
- ClassVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
263
- when 28 then
264
- ClassVariableReadNode.new(load_required_constant, location)
265
- when 29 then
266
- ClassVariableTargetNode.new(load_required_constant, location)
267
- when 30 then
268
- ClassVariableWriteNode.new(load_required_constant, load_location, load_node, load_optional_location, location)
269
- when 31 then
270
- ConstantAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
271
- when 32 then
272
- ConstantOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
273
- when 33 then
274
- ConstantOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
275
- when 34 then
276
- ConstantPathAndWriteNode.new(load_node, load_location, load_node, location)
277
- when 35 then
278
- ConstantPathNode.new(load_optional_node, load_node, load_location, location)
279
- when 36 then
280
- ConstantPathOperatorWriteNode.new(load_node, load_location, load_node, load_required_constant, location)
281
- when 37 then
282
- ConstantPathOrWriteNode.new(load_node, load_location, load_node, location)
283
- when 38 then
284
- ConstantPathTargetNode.new(load_optional_node, load_node, load_location, location)
285
- when 39 then
286
- ConstantPathWriteNode.new(load_node, load_location, load_node, location)
287
- when 40 then
288
- ConstantReadNode.new(load_required_constant, location)
289
- when 41 then
290
- ConstantTargetNode.new(load_required_constant, location)
291
- when 42 then
292
- ConstantWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
293
- when 43 then
294
- load_serialized_length
295
- DefNode.new(load_required_constant, load_location, load_optional_node, load_optional_node, load_optional_node, Array.new(load_varint) { load_required_constant }, load_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, location)
296
- when 44 then
297
- DefinedNode.new(load_optional_location, load_node, load_optional_location, load_location, location)
298
- when 45 then
299
- ElseNode.new(load_location, load_optional_node, load_optional_location, location)
300
- when 46 then
301
- EmbeddedStatementsNode.new(load_location, load_optional_node, load_location, location)
302
- when 47 then
303
- EmbeddedVariableNode.new(load_location, load_node, location)
304
- when 48 then
305
- EnsureNode.new(load_location, load_optional_node, load_location, location)
306
- when 49 then
307
- FalseNode.new(location)
308
- when 50 then
309
- FindPatternNode.new(load_optional_node, load_node, Array.new(load_varint) { load_node }, load_node, load_optional_location, load_optional_location, location)
310
- when 51 then
311
- FlipFlopNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
312
- when 52 then
313
- FloatNode.new(location)
314
- when 53 then
315
- ForNode.new(load_node, load_node, load_optional_node, load_location, load_location, load_optional_location, load_location, location)
316
- when 54 then
317
- ForwardingArgumentsNode.new(location)
318
- when 55 then
319
- ForwardingParameterNode.new(location)
320
- when 56 then
321
- ForwardingSuperNode.new(load_optional_node, location)
322
- when 57 then
323
- GlobalVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
324
- when 58 then
325
- GlobalVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
326
- when 59 then
327
- GlobalVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
328
- when 60 then
329
- GlobalVariableReadNode.new(load_required_constant, location)
330
- when 61 then
331
- GlobalVariableTargetNode.new(load_required_constant, location)
332
- when 62 then
333
- GlobalVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
334
- when 63 then
335
- HashNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
336
- when 64 then
337
- HashPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_optional_location, load_optional_location, location)
338
- when 65 then
339
- IfNode.new(load_optional_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
340
- when 66 then
341
- ImaginaryNode.new(load_node, location)
342
- when 67 then
343
- ImplicitNode.new(load_node, location)
344
- when 68 then
345
- InNode.new(load_node, load_optional_node, load_location, load_optional_location, location)
346
- when 69 then
347
- IndexAndWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
348
- when 70 then
349
- IndexOperatorWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_required_constant, load_location, load_node, location)
350
- when 71 then
351
- IndexOrWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
352
- when 72 then
353
- InstanceVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
354
- when 73 then
355
- InstanceVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
356
- when 74 then
357
- InstanceVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
358
- when 75 then
359
- InstanceVariableReadNode.new(load_required_constant, location)
360
- when 76 then
361
- InstanceVariableTargetNode.new(load_required_constant, location)
362
- when 77 then
363
- InstanceVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
364
- when 78 then
365
- IntegerNode.new(load_varint, location)
366
- when 79 then
367
- InterpolatedMatchLastLineNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
368
- when 80 then
369
- InterpolatedRegularExpressionNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
370
- when 81 then
371
- InterpolatedStringNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
372
- when 82 then
373
- InterpolatedSymbolNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
374
- when 83 then
375
- InterpolatedXStringNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
376
- when 84 then
377
- KeywordHashNode.new(Array.new(load_varint) { load_node }, location)
378
- when 85 then
379
- KeywordParameterNode.new(load_required_constant, load_location, load_optional_node, location)
380
- when 86 then
381
- KeywordRestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
382
- when 87 then
383
- LambdaNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node, location)
384
- when 88 then
385
- LocalVariableAndWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
386
- when 89 then
387
- LocalVariableOperatorWriteNode.new(load_location, load_location, load_node, load_required_constant, load_required_constant, load_varint, location)
388
- when 90 then
389
- LocalVariableOrWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
390
- when 91 then
391
- LocalVariableReadNode.new(load_required_constant, load_varint, location)
392
- when 92 then
393
- LocalVariableTargetNode.new(load_required_constant, load_varint, location)
394
- when 93 then
395
- LocalVariableWriteNode.new(load_required_constant, load_varint, load_location, load_node, load_location, location)
396
- when 94 then
397
- MatchLastLineNode.new(load_location, load_location, load_location, load_string, load_varint, location)
398
- when 95 then
399
- MatchPredicateNode.new(load_node, load_node, load_location, location)
400
- when 96 then
401
- MatchRequiredNode.new(load_node, load_node, load_location, location)
402
- when 97 then
403
- MatchWriteNode.new(load_node, Array.new(load_varint) { load_required_constant }, location)
404
- when 98 then
405
- MissingNode.new(location)
406
- when 99 then
407
- ModuleNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant, location)
408
- when 100 then
409
- MultiTargetNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
410
- when 101 then
411
- MultiWriteNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, load_location, load_node, location)
412
- when 102 then
413
- NextNode.new(load_optional_node, load_location, location)
414
- when 103 then
415
- NilNode.new(location)
416
- when 104 then
417
- NoKeywordsParameterNode.new(load_location, load_location, location)
418
- when 105 then
419
- NumberedReferenceReadNode.new(load_varint, location)
420
- when 106 then
421
- OptionalParameterNode.new(load_required_constant, load_location, load_location, load_node, location)
422
- when 107 then
423
- OrNode.new(load_node, load_node, load_location, location)
424
- when 108 then
425
- ParametersNode.new(Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, load_optional_node, location)
426
- when 109 then
427
- ParenthesesNode.new(load_optional_node, load_location, load_location, location)
428
- when 110 then
429
- PinnedExpressionNode.new(load_node, load_location, load_location, load_location, location)
430
- when 111 then
431
- PinnedVariableNode.new(load_node, load_location, location)
432
- when 112 then
433
- PostExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
434
- when 113 then
435
- PreExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
436
- when 114 then
437
- ProgramNode.new(Array.new(load_varint) { load_required_constant }, load_node, location)
438
- when 115 then
439
- RangeNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
440
- when 116 then
441
- RationalNode.new(load_node, location)
442
- when 117 then
443
- RedoNode.new(location)
444
- when 118 then
445
- RegularExpressionNode.new(load_location, load_location, load_location, load_string, load_varint, location)
446
- when 119 then
447
- RequiredDestructuredParameterNode.new(Array.new(load_varint) { load_node }, load_location, load_location, location)
448
- when 120 then
449
- RequiredParameterNode.new(load_required_constant, location)
450
- when 121 then
451
- RescueModifierNode.new(load_node, load_location, load_node, location)
452
- when 122 then
453
- RescueNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node, location)
454
- when 123 then
455
- RestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
456
- when 124 then
457
- RetryNode.new(location)
458
- when 125 then
459
- ReturnNode.new(load_location, load_optional_node, location)
460
- when 126 then
461
- SelfNode.new(location)
462
- when 127 then
463
- SingletonClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location, location)
464
- when 128 then
465
- SourceEncodingNode.new(location)
466
- when 129 then
467
- SourceFileNode.new(load_string, location)
468
- when 130 then
469
- SourceLineNode.new(location)
470
- when 131 then
471
- SplatNode.new(load_location, load_optional_node, location)
472
- when 132 then
473
- StatementsNode.new(Array.new(load_varint) { load_node }, location)
474
- when 133 then
475
- StringConcatNode.new(load_node, load_node, location)
476
- when 134 then
477
- StringNode.new(load_varint, load_optional_location, load_location, load_optional_location, load_string, location)
478
- when 135 then
479
- SuperNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, location)
480
- when 136 then
481
- SymbolNode.new(load_optional_location, load_optional_location, load_optional_location, load_string, location)
482
- when 137 then
483
- TrueNode.new(location)
484
- when 138 then
485
- UndefNode.new(Array.new(load_varint) { load_node }, load_location, location)
486
- when 139 then
487
- UnlessNode.new(load_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
488
- when 140 then
489
- UntilNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
490
- when 141 then
491
- WhenNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_node, location)
492
- when 142 then
493
- WhileNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
494
- when 143 then
495
- XStringNode.new(load_location, load_location, load_location, load_string, location)
496
- when 144 then
497
- YieldNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, location)
221
+ case type
222
+ when 1 then
223
+ AliasGlobalVariableNode.new(load_node, load_node, load_location, location)
224
+ when 2 then
225
+ AliasMethodNode.new(load_node, load_node, load_location, location)
226
+ when 3 then
227
+ AlternationPatternNode.new(load_node, load_node, load_location, location)
228
+ when 4 then
229
+ AndNode.new(load_node, load_node, load_location, location)
230
+ when 5 then
231
+ ArgumentsNode.new(Array.new(load_varint) { load_node }, load_varint, location)
232
+ when 6 then
233
+ ArrayNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
234
+ when 7 then
235
+ ArrayPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
236
+ when 8 then
237
+ AssocNode.new(load_node, load_optional_node, load_optional_location, location)
238
+ when 9 then
239
+ AssocSplatNode.new(load_optional_node, load_location, location)
240
+ when 10 then
241
+ BackReferenceReadNode.new(load_required_constant, location)
242
+ when 11 then
243
+ BeginNode.new(load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location, location)
244
+ when 12 then
245
+ BlockArgumentNode.new(load_optional_node, load_location, location)
246
+ when 13 then
247
+ BlockLocalVariableNode.new(load_required_constant, location)
248
+ when 14 then
249
+ BlockNode.new(Array.new(load_varint) { load_required_constant }, load_optional_node, load_optional_node, load_location, load_location, location)
250
+ when 15 then
251
+ BlockParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
252
+ when 16 then
253
+ BlockParametersNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
254
+ when 17 then
255
+ BreakNode.new(load_optional_node, load_location, location)
256
+ when 18 then
257
+ CallAndWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
258
+ when 19 then
259
+ CallNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, load_varint, load_required_constant, location)
260
+ when 20 then
261
+ CallOperatorWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_required_constant, load_location, load_node, location)
262
+ when 21 then
263
+ CallOrWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
264
+ when 22 then
265
+ CapturePatternNode.new(load_node, load_node, load_location, location)
266
+ when 23 then
267
+ CaseNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_location, load_location, location)
268
+ when 24 then
269
+ ClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_location, load_required_constant, location)
270
+ when 25 then
271
+ ClassVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
272
+ when 26 then
273
+ ClassVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
274
+ when 27 then
275
+ ClassVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
276
+ when 28 then
277
+ ClassVariableReadNode.new(load_required_constant, location)
278
+ when 29 then
279
+ ClassVariableTargetNode.new(load_required_constant, location)
280
+ when 30 then
281
+ ClassVariableWriteNode.new(load_required_constant, load_location, load_node, load_optional_location, location)
282
+ when 31 then
283
+ ConstantAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
284
+ when 32 then
285
+ ConstantOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
286
+ when 33 then
287
+ ConstantOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
288
+ when 34 then
289
+ ConstantPathAndWriteNode.new(load_node, load_location, load_node, location)
290
+ when 35 then
291
+ ConstantPathNode.new(load_optional_node, load_node, load_location, location)
292
+ when 36 then
293
+ ConstantPathOperatorWriteNode.new(load_node, load_location, load_node, load_required_constant, location)
294
+ when 37 then
295
+ ConstantPathOrWriteNode.new(load_node, load_location, load_node, location)
296
+ when 38 then
297
+ ConstantPathTargetNode.new(load_optional_node, load_node, load_location, location)
298
+ when 39 then
299
+ ConstantPathWriteNode.new(load_node, load_location, load_node, location)
300
+ when 40 then
301
+ ConstantReadNode.new(load_required_constant, location)
302
+ when 41 then
303
+ ConstantTargetNode.new(load_required_constant, location)
304
+ when 42 then
305
+ ConstantWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
306
+ when 43 then
307
+ load_serialized_length
308
+ DefNode.new(load_required_constant, load_location, load_optional_node, load_optional_node, load_optional_node, Array.new(load_varint) { load_required_constant }, load_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, location)
309
+ when 44 then
310
+ DefinedNode.new(load_optional_location, load_node, load_optional_location, load_location, location)
311
+ when 45 then
312
+ ElseNode.new(load_location, load_optional_node, load_optional_location, location)
313
+ when 46 then
314
+ EmbeddedStatementsNode.new(load_location, load_optional_node, load_location, location)
315
+ when 47 then
316
+ EmbeddedVariableNode.new(load_location, load_node, location)
317
+ when 48 then
318
+ EnsureNode.new(load_location, load_optional_node, load_location, location)
319
+ when 49 then
320
+ FalseNode.new(location)
321
+ when 50 then
322
+ FindPatternNode.new(load_optional_node, load_node, Array.new(load_varint) { load_node }, load_node, load_optional_location, load_optional_location, location)
323
+ when 51 then
324
+ FlipFlopNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
325
+ when 52 then
326
+ FloatNode.new(location)
327
+ when 53 then
328
+ ForNode.new(load_node, load_node, load_optional_node, load_location, load_location, load_optional_location, load_location, location)
329
+ when 54 then
330
+ ForwardingArgumentsNode.new(location)
331
+ when 55 then
332
+ ForwardingParameterNode.new(location)
333
+ when 56 then
334
+ ForwardingSuperNode.new(load_optional_node, location)
335
+ when 57 then
336
+ GlobalVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
337
+ when 58 then
338
+ GlobalVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
339
+ when 59 then
340
+ GlobalVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
341
+ when 60 then
342
+ GlobalVariableReadNode.new(load_required_constant, location)
343
+ when 61 then
344
+ GlobalVariableTargetNode.new(load_required_constant, location)
345
+ when 62 then
346
+ GlobalVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
347
+ when 63 then
348
+ HashNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
349
+ when 64 then
350
+ HashPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_optional_location, load_optional_location, location)
351
+ when 65 then
352
+ IfNode.new(load_optional_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
353
+ when 66 then
354
+ ImaginaryNode.new(load_node, location)
355
+ when 67 then
356
+ ImplicitNode.new(load_node, location)
357
+ when 68 then
358
+ InNode.new(load_node, load_optional_node, load_location, load_optional_location, location)
359
+ when 69 then
360
+ IndexAndWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
361
+ when 70 then
362
+ IndexOperatorWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_required_constant, load_location, load_node, location)
363
+ when 71 then
364
+ IndexOrWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
365
+ when 72 then
366
+ InstanceVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
367
+ when 73 then
368
+ InstanceVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
369
+ when 74 then
370
+ InstanceVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
371
+ when 75 then
372
+ InstanceVariableReadNode.new(load_required_constant, location)
373
+ when 76 then
374
+ InstanceVariableTargetNode.new(load_required_constant, location)
375
+ when 77 then
376
+ InstanceVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
377
+ when 78 then
378
+ IntegerNode.new(load_varint, location)
379
+ when 79 then
380
+ InterpolatedMatchLastLineNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
381
+ when 80 then
382
+ InterpolatedRegularExpressionNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
383
+ when 81 then
384
+ InterpolatedStringNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
385
+ when 82 then
386
+ InterpolatedSymbolNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
387
+ when 83 then
388
+ InterpolatedXStringNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
389
+ when 84 then
390
+ KeywordHashNode.new(Array.new(load_varint) { load_node }, location)
391
+ when 85 then
392
+ KeywordParameterNode.new(load_required_constant, load_location, load_optional_node, location)
393
+ when 86 then
394
+ KeywordRestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
395
+ when 87 then
396
+ LambdaNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node, location)
397
+ when 88 then
398
+ LocalVariableAndWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
399
+ when 89 then
400
+ LocalVariableOperatorWriteNode.new(load_location, load_location, load_node, load_required_constant, load_required_constant, load_varint, location)
401
+ when 90 then
402
+ LocalVariableOrWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
403
+ when 91 then
404
+ LocalVariableReadNode.new(load_required_constant, load_varint, location)
405
+ when 92 then
406
+ LocalVariableTargetNode.new(load_required_constant, load_varint, location)
407
+ when 93 then
408
+ LocalVariableWriteNode.new(load_required_constant, load_varint, load_location, load_node, load_location, location)
409
+ when 94 then
410
+ MatchLastLineNode.new(load_location, load_location, load_location, load_string, load_varint, location)
411
+ when 95 then
412
+ MatchPredicateNode.new(load_node, load_node, load_location, location)
413
+ when 96 then
414
+ MatchRequiredNode.new(load_node, load_node, load_location, location)
415
+ when 97 then
416
+ MatchWriteNode.new(load_node, Array.new(load_varint) { load_required_constant }, location)
417
+ when 98 then
418
+ MissingNode.new(location)
419
+ when 99 then
420
+ ModuleNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant, location)
421
+ when 100 then
422
+ MultiTargetNode.new(Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
423
+ when 101 then
424
+ MultiWriteNode.new(Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, load_location, load_node, location)
425
+ when 102 then
426
+ NextNode.new(load_optional_node, load_location, location)
427
+ when 103 then
428
+ NilNode.new(location)
429
+ when 104 then
430
+ NoKeywordsParameterNode.new(load_location, load_location, location)
431
+ when 105 then
432
+ NumberedReferenceReadNode.new(load_varint, location)
433
+ when 106 then
434
+ OptionalParameterNode.new(load_required_constant, load_location, load_location, load_node, location)
435
+ when 107 then
436
+ OrNode.new(load_node, load_node, load_location, location)
437
+ when 108 then
438
+ ParametersNode.new(Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, load_optional_node, location)
439
+ when 109 then
440
+ ParenthesesNode.new(load_optional_node, load_location, load_location, location)
441
+ when 110 then
442
+ PinnedExpressionNode.new(load_node, load_location, load_location, load_location, location)
443
+ when 111 then
444
+ PinnedVariableNode.new(load_node, load_location, location)
445
+ when 112 then
446
+ PostExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
447
+ when 113 then
448
+ PreExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
449
+ when 114 then
450
+ ProgramNode.new(Array.new(load_varint) { load_required_constant }, load_node, location)
451
+ when 115 then
452
+ RangeNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
453
+ when 116 then
454
+ RationalNode.new(load_node, location)
455
+ when 117 then
456
+ RedoNode.new(location)
457
+ when 118 then
458
+ RegularExpressionNode.new(load_location, load_location, load_location, load_string, load_varint, location)
459
+ when 119 then
460
+ RequiredParameterNode.new(load_required_constant, location)
461
+ when 120 then
462
+ RescueModifierNode.new(load_node, load_location, load_node, location)
463
+ when 121 then
464
+ RescueNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node, location)
465
+ when 122 then
466
+ RestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
467
+ when 123 then
468
+ RetryNode.new(location)
469
+ when 124 then
470
+ ReturnNode.new(load_location, load_optional_node, location)
471
+ when 125 then
472
+ SelfNode.new(location)
473
+ when 126 then
474
+ SingletonClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location, location)
475
+ when 127 then
476
+ SourceEncodingNode.new(location)
477
+ when 128 then
478
+ SourceFileNode.new(load_string, location)
479
+ when 129 then
480
+ SourceLineNode.new(location)
481
+ when 130 then
482
+ SplatNode.new(load_location, load_optional_node, location)
483
+ when 131 then
484
+ StatementsNode.new(Array.new(load_varint) { load_node }, location)
485
+ when 132 then
486
+ StringConcatNode.new(load_node, load_node, location)
487
+ when 133 then
488
+ StringNode.new(load_varint, load_optional_location, load_location, load_optional_location, load_string, location)
489
+ when 134 then
490
+ SuperNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, location)
491
+ when 135 then
492
+ SymbolNode.new(load_optional_location, load_optional_location, load_optional_location, load_string, location)
493
+ when 136 then
494
+ TrueNode.new(location)
495
+ when 137 then
496
+ UndefNode.new(Array.new(load_varint) { load_node }, load_location, location)
497
+ when 138 then
498
+ UnlessNode.new(load_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
499
+ when 139 then
500
+ UntilNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
501
+ when 140 then
502
+ WhenNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_node, location)
503
+ when 141 then
504
+ WhileNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
505
+ when 142 then
506
+ XStringNode.new(load_location, load_location, load_location, load_string, location)
507
+ when 143 then
508
+ YieldNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, location)
509
+ end
510
+ end
511
+ else
512
+ def load_node
513
+ type = io.getbyte
514
+ @load_node_lambdas[type].call
515
+ end
516
+
517
+ def define_load_node_lambdas
518
+ @load_node_lambdas = [
519
+ nil,
520
+ -> {
521
+ location = load_location
522
+ AliasGlobalVariableNode.new(load_node, load_node, load_location, location)
523
+ },
524
+ -> {
525
+ location = load_location
526
+ AliasMethodNode.new(load_node, load_node, load_location, location)
527
+ },
528
+ -> {
529
+ location = load_location
530
+ AlternationPatternNode.new(load_node, load_node, load_location, location)
531
+ },
532
+ -> {
533
+ location = load_location
534
+ AndNode.new(load_node, load_node, load_location, location)
535
+ },
536
+ -> {
537
+ location = load_location
538
+ ArgumentsNode.new(Array.new(load_varint) { load_node }, load_varint, location)
539
+ },
540
+ -> {
541
+ location = load_location
542
+ ArrayNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
543
+ },
544
+ -> {
545
+ location = load_location
546
+ ArrayPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
547
+ },
548
+ -> {
549
+ location = load_location
550
+ AssocNode.new(load_node, load_optional_node, load_optional_location, location)
551
+ },
552
+ -> {
553
+ location = load_location
554
+ AssocSplatNode.new(load_optional_node, load_location, location)
555
+ },
556
+ -> {
557
+ location = load_location
558
+ BackReferenceReadNode.new(load_required_constant, location)
559
+ },
560
+ -> {
561
+ location = load_location
562
+ BeginNode.new(load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location, location)
563
+ },
564
+ -> {
565
+ location = load_location
566
+ BlockArgumentNode.new(load_optional_node, load_location, location)
567
+ },
568
+ -> {
569
+ location = load_location
570
+ BlockLocalVariableNode.new(load_required_constant, location)
571
+ },
572
+ -> {
573
+ location = load_location
574
+ BlockNode.new(Array.new(load_varint) { load_required_constant }, load_optional_node, load_optional_node, load_location, load_location, location)
575
+ },
576
+ -> {
577
+ location = load_location
578
+ BlockParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
579
+ },
580
+ -> {
581
+ location = load_location
582
+ BlockParametersNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
583
+ },
584
+ -> {
585
+ location = load_location
586
+ BreakNode.new(load_optional_node, load_location, location)
587
+ },
588
+ -> {
589
+ location = load_location
590
+ CallAndWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
591
+ },
592
+ -> {
593
+ location = load_location
594
+ CallNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, load_varint, load_required_constant, location)
595
+ },
596
+ -> {
597
+ location = load_location
598
+ CallOperatorWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_required_constant, load_location, load_node, location)
599
+ },
600
+ -> {
601
+ location = load_location
602
+ CallOrWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
603
+ },
604
+ -> {
605
+ location = load_location
606
+ CapturePatternNode.new(load_node, load_node, load_location, location)
607
+ },
608
+ -> {
609
+ location = load_location
610
+ CaseNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_location, load_location, location)
611
+ },
612
+ -> {
613
+ location = load_location
614
+ ClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_location, load_optional_node, load_optional_node, load_location, load_required_constant, location)
615
+ },
616
+ -> {
617
+ location = load_location
618
+ ClassVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
619
+ },
620
+ -> {
621
+ location = load_location
622
+ ClassVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
623
+ },
624
+ -> {
625
+ location = load_location
626
+ ClassVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
627
+ },
628
+ -> {
629
+ location = load_location
630
+ ClassVariableReadNode.new(load_required_constant, location)
631
+ },
632
+ -> {
633
+ location = load_location
634
+ ClassVariableTargetNode.new(load_required_constant, location)
635
+ },
636
+ -> {
637
+ location = load_location
638
+ ClassVariableWriteNode.new(load_required_constant, load_location, load_node, load_optional_location, location)
639
+ },
640
+ -> {
641
+ location = load_location
642
+ ConstantAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
643
+ },
644
+ -> {
645
+ location = load_location
646
+ ConstantOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
647
+ },
648
+ -> {
649
+ location = load_location
650
+ ConstantOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
651
+ },
652
+ -> {
653
+ location = load_location
654
+ ConstantPathAndWriteNode.new(load_node, load_location, load_node, location)
655
+ },
656
+ -> {
657
+ location = load_location
658
+ ConstantPathNode.new(load_optional_node, load_node, load_location, location)
659
+ },
660
+ -> {
661
+ location = load_location
662
+ ConstantPathOperatorWriteNode.new(load_node, load_location, load_node, load_required_constant, location)
663
+ },
664
+ -> {
665
+ location = load_location
666
+ ConstantPathOrWriteNode.new(load_node, load_location, load_node, location)
667
+ },
668
+ -> {
669
+ location = load_location
670
+ ConstantPathTargetNode.new(load_optional_node, load_node, load_location, location)
671
+ },
672
+ -> {
673
+ location = load_location
674
+ ConstantPathWriteNode.new(load_node, load_location, load_node, location)
675
+ },
676
+ -> {
677
+ location = load_location
678
+ ConstantReadNode.new(load_required_constant, location)
679
+ },
680
+ -> {
681
+ location = load_location
682
+ ConstantTargetNode.new(load_required_constant, location)
683
+ },
684
+ -> {
685
+ location = load_location
686
+ ConstantWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
687
+ },
688
+ -> {
689
+ location = load_location
690
+ load_serialized_length
691
+ DefNode.new(load_required_constant, load_location, load_optional_node, load_optional_node, load_optional_node, Array.new(load_varint) { load_required_constant }, load_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, load_optional_location, location)
692
+ },
693
+ -> {
694
+ location = load_location
695
+ DefinedNode.new(load_optional_location, load_node, load_optional_location, load_location, location)
696
+ },
697
+ -> {
698
+ location = load_location
699
+ ElseNode.new(load_location, load_optional_node, load_optional_location, location)
700
+ },
701
+ -> {
702
+ location = load_location
703
+ EmbeddedStatementsNode.new(load_location, load_optional_node, load_location, location)
704
+ },
705
+ -> {
706
+ location = load_location
707
+ EmbeddedVariableNode.new(load_location, load_node, location)
708
+ },
709
+ -> {
710
+ location = load_location
711
+ EnsureNode.new(load_location, load_optional_node, load_location, location)
712
+ },
713
+ -> {
714
+ location = load_location
715
+ FalseNode.new(location)
716
+ },
717
+ -> {
718
+ location = load_location
719
+ FindPatternNode.new(load_optional_node, load_node, Array.new(load_varint) { load_node }, load_node, load_optional_location, load_optional_location, location)
720
+ },
721
+ -> {
722
+ location = load_location
723
+ FlipFlopNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
724
+ },
725
+ -> {
726
+ location = load_location
727
+ FloatNode.new(location)
728
+ },
729
+ -> {
730
+ location = load_location
731
+ ForNode.new(load_node, load_node, load_optional_node, load_location, load_location, load_optional_location, load_location, location)
732
+ },
733
+ -> {
734
+ location = load_location
735
+ ForwardingArgumentsNode.new(location)
736
+ },
737
+ -> {
738
+ location = load_location
739
+ ForwardingParameterNode.new(location)
740
+ },
741
+ -> {
742
+ location = load_location
743
+ ForwardingSuperNode.new(load_optional_node, location)
744
+ },
745
+ -> {
746
+ location = load_location
747
+ GlobalVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
748
+ },
749
+ -> {
750
+ location = load_location
751
+ GlobalVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
752
+ },
753
+ -> {
754
+ location = load_location
755
+ GlobalVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
756
+ },
757
+ -> {
758
+ location = load_location
759
+ GlobalVariableReadNode.new(load_required_constant, location)
760
+ },
761
+ -> {
762
+ location = load_location
763
+ GlobalVariableTargetNode.new(load_required_constant, location)
764
+ },
765
+ -> {
766
+ location = load_location
767
+ GlobalVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
768
+ },
769
+ -> {
770
+ location = load_location
771
+ HashNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
772
+ },
773
+ -> {
774
+ location = load_location
775
+ HashPatternNode.new(load_optional_node, Array.new(load_varint) { load_node }, load_optional_node, load_optional_location, load_optional_location, location)
776
+ },
777
+ -> {
778
+ location = load_location
779
+ IfNode.new(load_optional_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
780
+ },
781
+ -> {
782
+ location = load_location
783
+ ImaginaryNode.new(load_node, location)
784
+ },
785
+ -> {
786
+ location = load_location
787
+ ImplicitNode.new(load_node, location)
788
+ },
789
+ -> {
790
+ location = load_location
791
+ InNode.new(load_node, load_optional_node, load_location, load_optional_location, location)
792
+ },
793
+ -> {
794
+ location = load_location
795
+ IndexAndWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
796
+ },
797
+ -> {
798
+ location = load_location
799
+ IndexOperatorWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_required_constant, load_location, load_node, location)
800
+ },
801
+ -> {
802
+ location = load_location
803
+ IndexOrWriteNode.new(load_optional_node, load_optional_location, load_location, load_optional_node, load_location, load_optional_node, load_varint, load_location, load_node, location)
804
+ },
805
+ -> {
806
+ location = load_location
807
+ InstanceVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
808
+ },
809
+ -> {
810
+ location = load_location
811
+ InstanceVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
812
+ },
813
+ -> {
814
+ location = load_location
815
+ InstanceVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
816
+ },
817
+ -> {
818
+ location = load_location
819
+ InstanceVariableReadNode.new(load_required_constant, location)
820
+ },
821
+ -> {
822
+ location = load_location
823
+ InstanceVariableTargetNode.new(load_required_constant, location)
824
+ },
825
+ -> {
826
+ location = load_location
827
+ InstanceVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
828
+ },
829
+ -> {
830
+ location = load_location
831
+ IntegerNode.new(load_varint, location)
832
+ },
833
+ -> {
834
+ location = load_location
835
+ InterpolatedMatchLastLineNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
836
+ },
837
+ -> {
838
+ location = load_location
839
+ InterpolatedRegularExpressionNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
840
+ },
841
+ -> {
842
+ location = load_location
843
+ InterpolatedStringNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
844
+ },
845
+ -> {
846
+ location = load_location
847
+ InterpolatedSymbolNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
848
+ },
849
+ -> {
850
+ location = load_location
851
+ InterpolatedXStringNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
852
+ },
853
+ -> {
854
+ location = load_location
855
+ KeywordHashNode.new(Array.new(load_varint) { load_node }, location)
856
+ },
857
+ -> {
858
+ location = load_location
859
+ KeywordParameterNode.new(load_required_constant, load_location, load_optional_node, location)
860
+ },
861
+ -> {
862
+ location = load_location
863
+ KeywordRestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
864
+ },
865
+ -> {
866
+ location = load_location
867
+ LambdaNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node, location)
868
+ },
869
+ -> {
870
+ location = load_location
871
+ LocalVariableAndWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
872
+ },
873
+ -> {
874
+ location = load_location
875
+ LocalVariableOperatorWriteNode.new(load_location, load_location, load_node, load_required_constant, load_required_constant, load_varint, location)
876
+ },
877
+ -> {
878
+ location = load_location
879
+ LocalVariableOrWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
880
+ },
881
+ -> {
882
+ location = load_location
883
+ LocalVariableReadNode.new(load_required_constant, load_varint, location)
884
+ },
885
+ -> {
886
+ location = load_location
887
+ LocalVariableTargetNode.new(load_required_constant, load_varint, location)
888
+ },
889
+ -> {
890
+ location = load_location
891
+ LocalVariableWriteNode.new(load_required_constant, load_varint, load_location, load_node, load_location, location)
892
+ },
893
+ -> {
894
+ location = load_location
895
+ MatchLastLineNode.new(load_location, load_location, load_location, load_string, load_varint, location)
896
+ },
897
+ -> {
898
+ location = load_location
899
+ MatchPredicateNode.new(load_node, load_node, load_location, location)
900
+ },
901
+ -> {
902
+ location = load_location
903
+ MatchRequiredNode.new(load_node, load_node, load_location, location)
904
+ },
905
+ -> {
906
+ location = load_location
907
+ MatchWriteNode.new(load_node, Array.new(load_varint) { load_required_constant }, location)
908
+ },
909
+ -> {
910
+ location = load_location
911
+ MissingNode.new(location)
912
+ },
913
+ -> {
914
+ location = load_location
915
+ ModuleNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant, location)
916
+ },
917
+ -> {
918
+ location = load_location
919
+ MultiTargetNode.new(Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
920
+ },
921
+ -> {
922
+ location = load_location
923
+ MultiWriteNode.new(Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, load_location, load_node, location)
924
+ },
925
+ -> {
926
+ location = load_location
927
+ NextNode.new(load_optional_node, load_location, location)
928
+ },
929
+ -> {
930
+ location = load_location
931
+ NilNode.new(location)
932
+ },
933
+ -> {
934
+ location = load_location
935
+ NoKeywordsParameterNode.new(load_location, load_location, location)
936
+ },
937
+ -> {
938
+ location = load_location
939
+ NumberedReferenceReadNode.new(load_varint, location)
940
+ },
941
+ -> {
942
+ location = load_location
943
+ OptionalParameterNode.new(load_required_constant, load_location, load_location, load_node, location)
944
+ },
945
+ -> {
946
+ location = load_location
947
+ OrNode.new(load_node, load_node, load_location, location)
948
+ },
949
+ -> {
950
+ location = load_location
951
+ ParametersNode.new(Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, Array.new(load_varint) { load_node }, Array.new(load_varint) { load_node }, load_optional_node, load_optional_node, location)
952
+ },
953
+ -> {
954
+ location = load_location
955
+ ParenthesesNode.new(load_optional_node, load_location, load_location, location)
956
+ },
957
+ -> {
958
+ location = load_location
959
+ PinnedExpressionNode.new(load_node, load_location, load_location, load_location, location)
960
+ },
961
+ -> {
962
+ location = load_location
963
+ PinnedVariableNode.new(load_node, load_location, location)
964
+ },
965
+ -> {
966
+ location = load_location
967
+ PostExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
968
+ },
969
+ -> {
970
+ location = load_location
971
+ PreExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
972
+ },
973
+ -> {
974
+ location = load_location
975
+ ProgramNode.new(Array.new(load_varint) { load_required_constant }, load_node, location)
976
+ },
977
+ -> {
978
+ location = load_location
979
+ RangeNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
980
+ },
981
+ -> {
982
+ location = load_location
983
+ RationalNode.new(load_node, location)
984
+ },
985
+ -> {
986
+ location = load_location
987
+ RedoNode.new(location)
988
+ },
989
+ -> {
990
+ location = load_location
991
+ RegularExpressionNode.new(load_location, load_location, load_location, load_string, load_varint, location)
992
+ },
993
+ -> {
994
+ location = load_location
995
+ RequiredParameterNode.new(load_required_constant, location)
996
+ },
997
+ -> {
998
+ location = load_location
999
+ RescueModifierNode.new(load_node, load_location, load_node, location)
1000
+ },
1001
+ -> {
1002
+ location = load_location
1003
+ RescueNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node, location)
1004
+ },
1005
+ -> {
1006
+ location = load_location
1007
+ RestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
1008
+ },
1009
+ -> {
1010
+ location = load_location
1011
+ RetryNode.new(location)
1012
+ },
1013
+ -> {
1014
+ location = load_location
1015
+ ReturnNode.new(load_location, load_optional_node, location)
1016
+ },
1017
+ -> {
1018
+ location = load_location
1019
+ SelfNode.new(location)
1020
+ },
1021
+ -> {
1022
+ location = load_location
1023
+ SingletonClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location, location)
1024
+ },
1025
+ -> {
1026
+ location = load_location
1027
+ SourceEncodingNode.new(location)
1028
+ },
1029
+ -> {
1030
+ location = load_location
1031
+ SourceFileNode.new(load_string, location)
1032
+ },
1033
+ -> {
1034
+ location = load_location
1035
+ SourceLineNode.new(location)
1036
+ },
1037
+ -> {
1038
+ location = load_location
1039
+ SplatNode.new(load_location, load_optional_node, location)
1040
+ },
1041
+ -> {
1042
+ location = load_location
1043
+ StatementsNode.new(Array.new(load_varint) { load_node }, location)
1044
+ },
1045
+ -> {
1046
+ location = load_location
1047
+ StringConcatNode.new(load_node, load_node, location)
1048
+ },
1049
+ -> {
1050
+ location = load_location
1051
+ StringNode.new(load_varint, load_optional_location, load_location, load_optional_location, load_string, location)
1052
+ },
1053
+ -> {
1054
+ location = load_location
1055
+ SuperNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, location)
1056
+ },
1057
+ -> {
1058
+ location = load_location
1059
+ SymbolNode.new(load_optional_location, load_optional_location, load_optional_location, load_string, location)
1060
+ },
1061
+ -> {
1062
+ location = load_location
1063
+ TrueNode.new(location)
1064
+ },
1065
+ -> {
1066
+ location = load_location
1067
+ UndefNode.new(Array.new(load_varint) { load_node }, load_location, location)
1068
+ },
1069
+ -> {
1070
+ location = load_location
1071
+ UnlessNode.new(load_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
1072
+ },
1073
+ -> {
1074
+ location = load_location
1075
+ UntilNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
1076
+ },
1077
+ -> {
1078
+ location = load_location
1079
+ WhenNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_node, location)
1080
+ },
1081
+ -> {
1082
+ location = load_location
1083
+ WhileNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
1084
+ },
1085
+ -> {
1086
+ location = load_location
1087
+ XStringNode.new(load_location, load_location, load_location, load_string, location)
1088
+ },
1089
+ -> {
1090
+ location = load_location
1091
+ YieldNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, location)
1092
+ },
1093
+ ]
498
1094
  end
499
1095
  end
500
1096
  end