prism 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ end
21
21
  module Prism
22
22
  module Serialize
23
23
  MAJOR_VERSION = 0
24
- MINOR_VERSION = 14
24
+ MINOR_VERSION = 15
25
25
  PATCH_VERSION = 0
26
26
 
27
27
  def self.load(input, serialized)
@@ -225,7 +225,7 @@ module Prism
225
225
  when 9 then
226
226
  AssocSplatNode.new(load_optional_node, load_location, location)
227
227
  when 10 then
228
- BackReferenceReadNode.new(location)
228
+ BackReferenceReadNode.new(load_required_constant, location)
229
229
  when 11 then
230
230
  BeginNode.new(load_optional_location, load_optional_node, load_optional_node, load_optional_node, load_optional_node, load_optional_location, location)
231
231
  when 12 then
@@ -241,13 +241,13 @@ module Prism
241
241
  when 17 then
242
242
  BreakNode.new(load_optional_node, load_location, location)
243
243
  when 18 then
244
- CallAndWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
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
245
  when 19 then
246
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
247
  when 20 then
248
- CallOperatorWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_varint, load_required_constant, load_required_constant, load_required_constant, load_location, load_node, location)
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
249
  when 21 then
250
- CallOrWriteNode.new(load_optional_node, load_optional_location, load_optional_location, load_optional_location, load_optional_node, load_optional_location, load_varint, load_required_constant, load_required_constant, load_location, load_node, location)
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
251
  when 22 then
252
252
  CapturePatternNode.new(load_node, load_node, load_location, location)
253
253
  when 23 then
@@ -344,150 +344,156 @@ module Prism
344
344
  when 68 then
345
345
  InNode.new(load_node, load_optional_node, load_location, load_optional_location, location)
346
346
  when 69 then
347
- InstanceVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
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
348
  when 70 then
349
- InstanceVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
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
350
  when 71 then
351
- InstanceVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
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
352
  when 72 then
353
- InstanceVariableReadNode.new(load_required_constant, location)
353
+ InstanceVariableAndWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
354
354
  when 73 then
355
- InstanceVariableTargetNode.new(load_required_constant, location)
355
+ InstanceVariableOperatorWriteNode.new(load_required_constant, load_location, load_location, load_node, load_required_constant, location)
356
356
  when 74 then
357
- InstanceVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
357
+ InstanceVariableOrWriteNode.new(load_required_constant, load_location, load_location, load_node, location)
358
358
  when 75 then
359
- IntegerNode.new(load_varint, location)
359
+ InstanceVariableReadNode.new(load_required_constant, location)
360
360
  when 76 then
361
- InterpolatedMatchLastLineNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
361
+ InstanceVariableTargetNode.new(load_required_constant, location)
362
362
  when 77 then
363
- InterpolatedRegularExpressionNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
363
+ InstanceVariableWriteNode.new(load_required_constant, load_location, load_node, load_location, location)
364
364
  when 78 then
365
- InterpolatedStringNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
365
+ IntegerNode.new(load_varint, location)
366
366
  when 79 then
367
- InterpolatedSymbolNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
367
+ InterpolatedMatchLastLineNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
368
368
  when 80 then
369
- InterpolatedXStringNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
369
+ InterpolatedRegularExpressionNode.new(load_location, Array.new(load_varint) { load_node }, load_location, load_varint, location)
370
370
  when 81 then
371
- KeywordHashNode.new(Array.new(load_varint) { load_node }, location)
371
+ InterpolatedStringNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
372
372
  when 82 then
373
- KeywordParameterNode.new(load_required_constant, load_location, load_optional_node, location)
373
+ InterpolatedSymbolNode.new(load_optional_location, Array.new(load_varint) { load_node }, load_optional_location, location)
374
374
  when 83 then
375
- KeywordRestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
375
+ InterpolatedXStringNode.new(load_location, Array.new(load_varint) { load_node }, load_location, location)
376
376
  when 84 then
377
- LambdaNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node, location)
377
+ KeywordHashNode.new(Array.new(load_varint) { load_node }, location)
378
378
  when 85 then
379
- LocalVariableAndWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
379
+ KeywordParameterNode.new(load_required_constant, load_location, load_optional_node, location)
380
380
  when 86 then
381
- LocalVariableOperatorWriteNode.new(load_location, load_location, load_node, load_required_constant, load_required_constant, load_varint, location)
381
+ KeywordRestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
382
382
  when 87 then
383
- LocalVariableOrWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
383
+ LambdaNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_location, load_optional_node, load_optional_node, location)
384
384
  when 88 then
385
- LocalVariableReadNode.new(load_required_constant, load_varint, location)
385
+ LocalVariableAndWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
386
386
  when 89 then
387
- LocalVariableTargetNode.new(load_required_constant, load_varint, location)
387
+ LocalVariableOperatorWriteNode.new(load_location, load_location, load_node, load_required_constant, load_required_constant, load_varint, location)
388
388
  when 90 then
389
- LocalVariableWriteNode.new(load_required_constant, load_varint, load_location, load_node, load_location, location)
389
+ LocalVariableOrWriteNode.new(load_location, load_location, load_node, load_required_constant, load_varint, location)
390
390
  when 91 then
391
- MatchLastLineNode.new(load_location, load_location, load_location, load_string, load_varint, location)
391
+ LocalVariableReadNode.new(load_required_constant, load_varint, location)
392
392
  when 92 then
393
- MatchPredicateNode.new(load_node, load_node, load_location, location)
393
+ LocalVariableTargetNode.new(load_required_constant, load_varint, location)
394
394
  when 93 then
395
- MatchRequiredNode.new(load_node, load_node, load_location, location)
395
+ LocalVariableWriteNode.new(load_required_constant, load_varint, load_location, load_node, load_location, location)
396
396
  when 94 then
397
- MatchWriteNode.new(load_node, Array.new(load_varint) { load_required_constant }, location)
397
+ MatchLastLineNode.new(load_location, load_location, load_location, load_string, load_varint, location)
398
398
  when 95 then
399
- MissingNode.new(location)
399
+ MatchPredicateNode.new(load_node, load_node, load_location, location)
400
400
  when 96 then
401
- ModuleNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant, location)
401
+ MatchRequiredNode.new(load_node, load_node, load_location, location)
402
402
  when 97 then
403
- MultiTargetNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
403
+ MatchWriteNode.new(load_node, Array.new(load_varint) { load_required_constant }, location)
404
404
  when 98 then
405
- MultiWriteNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, load_location, load_node, location)
405
+ MissingNode.new(location)
406
406
  when 99 then
407
- NextNode.new(load_optional_node, load_location, location)
407
+ ModuleNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_node, load_optional_node, load_location, load_required_constant, location)
408
408
  when 100 then
409
- NilNode.new(location)
409
+ MultiTargetNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, location)
410
410
  when 101 then
411
- NoKeywordsParameterNode.new(load_location, load_location, location)
411
+ MultiWriteNode.new(Array.new(load_varint) { load_node }, load_optional_location, load_optional_location, load_location, load_node, location)
412
412
  when 102 then
413
- NumberedReferenceReadNode.new(load_varint, location)
413
+ NextNode.new(load_optional_node, load_location, location)
414
414
  when 103 then
415
- OptionalParameterNode.new(load_required_constant, load_location, load_location, load_node, location)
415
+ NilNode.new(location)
416
416
  when 104 then
417
- OrNode.new(load_node, load_node, load_location, location)
417
+ NoKeywordsParameterNode.new(load_location, load_location, location)
418
418
  when 105 then
419
- 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)
419
+ NumberedReferenceReadNode.new(load_varint, location)
420
420
  when 106 then
421
- ParenthesesNode.new(load_optional_node, load_location, load_location, location)
421
+ OptionalParameterNode.new(load_required_constant, load_location, load_location, load_node, location)
422
422
  when 107 then
423
- PinnedExpressionNode.new(load_node, load_location, load_location, load_location, location)
423
+ OrNode.new(load_node, load_node, load_location, location)
424
424
  when 108 then
425
- PinnedVariableNode.new(load_node, load_location, location)
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
426
  when 109 then
427
- PostExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
427
+ ParenthesesNode.new(load_optional_node, load_location, load_location, location)
428
428
  when 110 then
429
- PreExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
429
+ PinnedExpressionNode.new(load_node, load_location, load_location, load_location, location)
430
430
  when 111 then
431
- ProgramNode.new(Array.new(load_varint) { load_required_constant }, load_node, location)
431
+ PinnedVariableNode.new(load_node, load_location, location)
432
432
  when 112 then
433
- RangeNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
433
+ PostExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
434
434
  when 113 then
435
- RationalNode.new(load_node, location)
435
+ PreExecutionNode.new(load_optional_node, load_location, load_location, load_location, location)
436
436
  when 114 then
437
- RedoNode.new(location)
437
+ ProgramNode.new(Array.new(load_varint) { load_required_constant }, load_node, location)
438
438
  when 115 then
439
- RegularExpressionNode.new(load_location, load_location, load_location, load_string, load_varint, location)
439
+ RangeNode.new(load_optional_node, load_optional_node, load_location, load_varint, location)
440
440
  when 116 then
441
- RequiredDestructuredParameterNode.new(Array.new(load_varint) { load_node }, load_location, load_location, location)
441
+ RationalNode.new(load_node, location)
442
442
  when 117 then
443
- RequiredParameterNode.new(load_required_constant, location)
443
+ RedoNode.new(location)
444
444
  when 118 then
445
- RescueModifierNode.new(load_node, load_location, load_node, location)
445
+ RegularExpressionNode.new(load_location, load_location, load_location, load_string, load_varint, location)
446
446
  when 119 then
447
- RescueNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_location, load_optional_node, load_optional_node, load_optional_node, location)
447
+ RequiredDestructuredParameterNode.new(Array.new(load_varint) { load_node }, load_location, load_location, location)
448
448
  when 120 then
449
- RestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
449
+ RequiredParameterNode.new(load_required_constant, location)
450
450
  when 121 then
451
- RetryNode.new(location)
451
+ RescueModifierNode.new(load_node, load_location, load_node, location)
452
452
  when 122 then
453
- ReturnNode.new(load_location, load_optional_node, location)
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
454
  when 123 then
455
- SelfNode.new(location)
455
+ RestParameterNode.new(load_optional_constant, load_optional_location, load_location, location)
456
456
  when 124 then
457
- SingletonClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location, location)
457
+ RetryNode.new(location)
458
458
  when 125 then
459
- SourceEncodingNode.new(location)
459
+ ReturnNode.new(load_location, load_optional_node, location)
460
460
  when 126 then
461
- SourceFileNode.new(load_string, location)
461
+ SelfNode.new(location)
462
462
  when 127 then
463
- SourceLineNode.new(location)
463
+ SingletonClassNode.new(Array.new(load_varint) { load_required_constant }, load_location, load_location, load_node, load_optional_node, load_location, location)
464
464
  when 128 then
465
- SplatNode.new(load_location, load_optional_node, location)
465
+ SourceEncodingNode.new(location)
466
466
  when 129 then
467
- StatementsNode.new(Array.new(load_varint) { load_node }, location)
467
+ SourceFileNode.new(load_string, location)
468
468
  when 130 then
469
- StringConcatNode.new(load_node, load_node, location)
469
+ SourceLineNode.new(location)
470
470
  when 131 then
471
- StringNode.new(load_varint, load_optional_location, load_location, load_optional_location, load_string, location)
471
+ SplatNode.new(load_location, load_optional_node, location)
472
472
  when 132 then
473
- SuperNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, location)
473
+ StatementsNode.new(Array.new(load_varint) { load_node }, location)
474
474
  when 133 then
475
- SymbolNode.new(load_optional_location, load_optional_location, load_optional_location, load_string, location)
475
+ StringConcatNode.new(load_node, load_node, location)
476
476
  when 134 then
477
- TrueNode.new(location)
477
+ StringNode.new(load_varint, load_optional_location, load_location, load_optional_location, load_string, location)
478
478
  when 135 then
479
- UndefNode.new(Array.new(load_varint) { load_node }, load_location, location)
479
+ SuperNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, load_optional_node, location)
480
480
  when 136 then
481
- UnlessNode.new(load_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
481
+ SymbolNode.new(load_optional_location, load_optional_location, load_optional_location, load_string, location)
482
482
  when 137 then
483
- UntilNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
483
+ TrueNode.new(location)
484
484
  when 138 then
485
- WhenNode.new(load_location, Array.new(load_varint) { load_node }, load_optional_node, location)
485
+ UndefNode.new(Array.new(load_varint) { load_node }, load_location, location)
486
486
  when 139 then
487
- WhileNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
487
+ UnlessNode.new(load_location, load_node, load_optional_node, load_optional_node, load_optional_location, location)
488
488
  when 140 then
489
- XStringNode.new(load_location, load_location, load_location, load_string, location)
489
+ UntilNode.new(load_location, load_optional_location, load_node, load_optional_node, load_varint, location)
490
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
491
497
  YieldNode.new(load_location, load_optional_location, load_optional_node, load_optional_location, location)
492
498
  end
493
499
  end
data/lib/prism/visitor.rb CHANGED
@@ -248,6 +248,15 @@ module Prism
248
248
  # Visit a InNode node
249
249
  alias visit_in_node visit_child_nodes
250
250
 
251
+ # Visit a IndexAndWriteNode node
252
+ alias visit_index_and_write_node visit_child_nodes
253
+
254
+ # Visit a IndexOperatorWriteNode node
255
+ alias visit_index_operator_write_node visit_child_nodes
256
+
257
+ # Visit a IndexOrWriteNode node
258
+ alias visit_index_or_write_node visit_child_nodes
259
+
251
260
  # Visit a InstanceVariableAndWriteNode node
252
261
  alias visit_instance_variable_and_write_node visit_child_nodes
253
262
 
data/prism.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "prism"
5
- spec.version = "0.14.0"
5
+ spec.version = "0.15.0"
6
6
  spec.authors = ["Shopify"]
7
7
  spec.email = ["ruby@shopify.com"]
8
8
 
data/src/diagnostic.c CHANGED
@@ -192,6 +192,7 @@ static const char* const diagnostic_messages[PM_DIAGNOSTIC_ID_LEN] = {
192
192
  [PM_ERR_NUMBERED_PARAMETER_NOT_ALLOWED] = "Numbered parameters are not allowed alongside explicit parameters",
193
193
  [PM_ERR_NUMBERED_PARAMETER_OUTER_SCOPE] = "Numbered parameter is already used in outer scope",
194
194
  [PM_ERR_OPERATOR_MULTI_ASSIGN] = "Unexpected operator for a multiple assignment",
195
+ [PM_ERR_OPERATOR_WRITE_ARGUMENTS] = "Unexpected operator after a call with arguments",
195
196
  [PM_ERR_OPERATOR_WRITE_BLOCK] = "Unexpected operator after a call with a block",
196
197
  [PM_ERR_PARAMETER_ASSOC_SPLAT_MULTI] = "Unexpected multiple `**` splat parameters",
197
198
  [PM_ERR_PARAMETER_BLOCK_MULTI] = "Multiple block parameters; only one block is allowed",
data/src/node.c CHANGED
@@ -201,9 +201,6 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
201
201
  if (cast->receiver != NULL) {
202
202
  pm_node_destroy(parser, (pm_node_t *)cast->receiver);
203
203
  }
204
- if (cast->arguments != NULL) {
205
- pm_node_destroy(parser, (pm_node_t *)cast->arguments);
206
- }
207
204
  pm_node_destroy(parser, (pm_node_t *)cast->value);
208
205
  break;
209
206
  }
@@ -227,9 +224,6 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
227
224
  if (cast->receiver != NULL) {
228
225
  pm_node_destroy(parser, (pm_node_t *)cast->receiver);
229
226
  }
230
- if (cast->arguments != NULL) {
231
- pm_node_destroy(parser, (pm_node_t *)cast->arguments);
232
- }
233
227
  pm_node_destroy(parser, (pm_node_t *)cast->value);
234
228
  break;
235
229
  }
@@ -239,9 +233,6 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
239
233
  if (cast->receiver != NULL) {
240
234
  pm_node_destroy(parser, (pm_node_t *)cast->receiver);
241
235
  }
242
- if (cast->arguments != NULL) {
243
- pm_node_destroy(parser, (pm_node_t *)cast->arguments);
244
- }
245
236
  pm_node_destroy(parser, (pm_node_t *)cast->value);
246
237
  break;
247
238
  }
@@ -577,6 +568,51 @@ pm_node_destroy(pm_parser_t *parser, pm_node_t *node) {
577
568
  }
578
569
  break;
579
570
  }
571
+ #line 57 "node.c.erb"
572
+ case PM_INDEX_AND_WRITE_NODE: {
573
+ pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
574
+ if (cast->receiver != NULL) {
575
+ pm_node_destroy(parser, (pm_node_t *)cast->receiver);
576
+ }
577
+ if (cast->arguments != NULL) {
578
+ pm_node_destroy(parser, (pm_node_t *)cast->arguments);
579
+ }
580
+ if (cast->block != NULL) {
581
+ pm_node_destroy(parser, (pm_node_t *)cast->block);
582
+ }
583
+ pm_node_destroy(parser, (pm_node_t *)cast->value);
584
+ break;
585
+ }
586
+ #line 57 "node.c.erb"
587
+ case PM_INDEX_OPERATOR_WRITE_NODE: {
588
+ pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
589
+ if (cast->receiver != NULL) {
590
+ pm_node_destroy(parser, (pm_node_t *)cast->receiver);
591
+ }
592
+ if (cast->arguments != NULL) {
593
+ pm_node_destroy(parser, (pm_node_t *)cast->arguments);
594
+ }
595
+ if (cast->block != NULL) {
596
+ pm_node_destroy(parser, (pm_node_t *)cast->block);
597
+ }
598
+ pm_node_destroy(parser, (pm_node_t *)cast->value);
599
+ break;
600
+ }
601
+ #line 57 "node.c.erb"
602
+ case PM_INDEX_OR_WRITE_NODE: {
603
+ pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
604
+ if (cast->receiver != NULL) {
605
+ pm_node_destroy(parser, (pm_node_t *)cast->receiver);
606
+ }
607
+ if (cast->arguments != NULL) {
608
+ pm_node_destroy(parser, (pm_node_t *)cast->arguments);
609
+ }
610
+ if (cast->block != NULL) {
611
+ pm_node_destroy(parser, (pm_node_t *)cast->block);
612
+ }
613
+ pm_node_destroy(parser, (pm_node_t *)cast->value);
614
+ break;
615
+ }
580
616
  #line 57 "node.c.erb"
581
617
  case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
582
618
  pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
@@ -1253,9 +1289,6 @@ pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize) {
1253
1289
  if (cast->receiver != NULL) {
1254
1290
  pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1255
1291
  }
1256
- if (cast->arguments != NULL) {
1257
- pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1258
- }
1259
1292
  pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1260
1293
  break;
1261
1294
  }
@@ -1281,9 +1314,6 @@ pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize) {
1281
1314
  if (cast->receiver != NULL) {
1282
1315
  pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1283
1316
  }
1284
- if (cast->arguments != NULL) {
1285
- pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1286
- }
1287
1317
  pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1288
1318
  break;
1289
1319
  }
@@ -1294,9 +1324,6 @@ pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize) {
1294
1324
  if (cast->receiver != NULL) {
1295
1325
  pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1296
1326
  }
1297
- if (cast->arguments != NULL) {
1298
- pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1299
- }
1300
1327
  pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1301
1328
  break;
1302
1329
  }
@@ -1701,6 +1728,54 @@ pm_node_memsize_node(pm_node_t *node, pm_memsize_t *memsize) {
1701
1728
  }
1702
1729
  break;
1703
1730
  }
1731
+ #line 102 "node.c.erb"
1732
+ case PM_INDEX_AND_WRITE_NODE: {
1733
+ pm_index_and_write_node_t *cast = (pm_index_and_write_node_t *) node;
1734
+ memsize->memsize += sizeof(*cast);
1735
+ if (cast->receiver != NULL) {
1736
+ pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1737
+ }
1738
+ if (cast->arguments != NULL) {
1739
+ pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1740
+ }
1741
+ if (cast->block != NULL) {
1742
+ pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1743
+ }
1744
+ pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1745
+ break;
1746
+ }
1747
+ #line 102 "node.c.erb"
1748
+ case PM_INDEX_OPERATOR_WRITE_NODE: {
1749
+ pm_index_operator_write_node_t *cast = (pm_index_operator_write_node_t *) node;
1750
+ memsize->memsize += sizeof(*cast);
1751
+ if (cast->receiver != NULL) {
1752
+ pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1753
+ }
1754
+ if (cast->arguments != NULL) {
1755
+ pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1756
+ }
1757
+ if (cast->block != NULL) {
1758
+ pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1759
+ }
1760
+ pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1761
+ break;
1762
+ }
1763
+ #line 102 "node.c.erb"
1764
+ case PM_INDEX_OR_WRITE_NODE: {
1765
+ pm_index_or_write_node_t *cast = (pm_index_or_write_node_t *) node;
1766
+ memsize->memsize += sizeof(*cast);
1767
+ if (cast->receiver != NULL) {
1768
+ pm_node_memsize_node((pm_node_t *)cast->receiver, memsize);
1769
+ }
1770
+ if (cast->arguments != NULL) {
1771
+ pm_node_memsize_node((pm_node_t *)cast->arguments, memsize);
1772
+ }
1773
+ if (cast->block != NULL) {
1774
+ pm_node_memsize_node((pm_node_t *)cast->block, memsize);
1775
+ }
1776
+ pm_node_memsize_node((pm_node_t *)cast->value, memsize);
1777
+ break;
1778
+ }
1704
1779
  #line 102 "node.c.erb"
1705
1780
  case PM_INSTANCE_VARIABLE_AND_WRITE_NODE: {
1706
1781
  pm_instance_variable_and_write_node_t *cast = (pm_instance_variable_and_write_node_t *) node;
@@ -2468,6 +2543,12 @@ pm_node_type_to_str(pm_node_type_t node_type)
2468
2543
  return "PM_IMPLICIT_NODE";
2469
2544
  case PM_IN_NODE:
2470
2545
  return "PM_IN_NODE";
2546
+ case PM_INDEX_AND_WRITE_NODE:
2547
+ return "PM_INDEX_AND_WRITE_NODE";
2548
+ case PM_INDEX_OPERATOR_WRITE_NODE:
2549
+ return "PM_INDEX_OPERATOR_WRITE_NODE";
2550
+ case PM_INDEX_OR_WRITE_NODE:
2551
+ return "PM_INDEX_OR_WRITE_NODE";
2471
2552
  case PM_INSTANCE_VARIABLE_AND_WRITE_NODE:
2472
2553
  return "PM_INSTANCE_VARIABLE_AND_WRITE_NODE";
2473
2554
  case PM_INSTANCE_VARIABLE_OPERATOR_WRITE_NODE: