@@ -97,12 +97,16 @@ private module Cached {
97
97
} or
98
98
TBlockArgument ( Ruby:: BlockArgument g ) or
99
99
TBlockParameter ( Ruby:: BlockParameter g ) or
100
+ TBooleanLiteralSynth ( Ast:: AstNode parent , int i , boolean value ) {
101
+ mkSynthChild ( BooleanLiteralKind ( value ) , parent , i )
102
+ } or
100
103
TBraceBlockSynth ( Ast:: AstNode parent , int i ) { mkSynthChild ( BraceBlockKind ( ) , parent , i ) } or
101
104
TBraceBlockReal ( Ruby:: Block g ) { not g .getParent ( ) instanceof Ruby:: Lambda } or
102
105
TBreakStmt ( Ruby:: Break g ) or
103
106
TCaseEqExpr ( Ruby:: Binary g ) { g instanceof @ruby_binary_equalequalequal } or
104
107
TCaseExpr ( Ruby:: Case g ) or
105
- TCaseMatch ( Ruby:: CaseMatch g ) or
108
+ TCaseMatchReal ( Ruby:: CaseMatch g ) or
109
+ TCaseMatchSynth ( Ast:: AstNode parent , int i ) { mkSynthChild ( CaseMatchKind ( ) , parent , i ) } or
106
110
TCharacterLiteral ( Ruby:: Character g ) or
107
111
TClassDeclaration ( Ruby:: Class g ) or
108
112
TClassVariableAccessReal ( Ruby:: ClassVariable g , Ast:: ClassVariable v ) {
@@ -130,6 +134,7 @@ private module Cached {
130
134
TDoBlock ( Ruby:: DoBlock g ) { not g .getParent ( ) instanceof Ruby:: Lambda } or
131
135
TElementReference ( Ruby:: ElementReference g ) or
132
136
TElse ( Ruby:: Else g ) or
137
+ TElseSynth ( Ast:: AstNode parent , int i ) { mkSynthChild ( ElseKind ( ) , parent , i ) } or
133
138
TElsif ( Ruby:: Elsif g ) or
134
139
TEmptyStmt ( Ruby:: EmptyStatement g ) or
135
140
TEncoding ( Ruby:: Encoding g ) or
@@ -168,7 +173,8 @@ private module Cached {
168
173
TIfReal ( Ruby:: If g ) or
169
174
TIfSynth ( Ast:: AstNode parent , int i ) { mkSynthChild ( IfKind ( ) , parent , i ) } or
170
175
TIfModifierExpr ( Ruby:: IfModifier g ) or
171
- TInClause ( Ruby:: InClause g ) or
176
+ TInClauseReal ( Ruby:: InClause g ) or
177
+ TInClauseSynth ( Ast:: AstNode parent , int i ) { mkSynthChild ( InClauseKind ( ) , parent , i ) } or
172
178
TInstanceVariableAccessReal ( Ruby:: InstanceVariable g , Ast:: InstanceVariable v ) {
173
179
InstanceVariableAccess:: range ( g , v )
174
180
} or
@@ -346,7 +352,7 @@ private module Cached {
346
352
TAssignMulExpr or TAssignRShiftExpr or TAssignSubExpr or TBareStringLiteral or
347
353
TBareSymbolLiteral or TBeginBlock or TBeginExpr or TBitwiseAndExprReal or
348
354
TBitwiseOrExprReal or TBitwiseXorExprReal or TBlockArgument or TBlockParameter or
349
- TBraceBlockReal or TBreakStmt or TCaseEqExpr or TCaseExpr or TCaseMatch or
355
+ TBraceBlockReal or TBreakStmt or TCaseEqExpr or TCaseExpr or TCaseMatchReal or
350
356
TCharacterLiteral or TClassDeclaration or TClassVariableAccessReal or TComplementExpr or
351
357
TComplexLiteral or TDefinedExpr or TDelimitedSymbolLiteral or TDestructuredLeftAssignment or
352
358
TDestructuredParameter or TDivExprReal or TDo or TDoBlock or TElementReference or TElse or
@@ -355,7 +361,7 @@ private module Cached {
355
361
TForwardArgument or TGEExpr or TGTExpr or TGlobalVariableAccessReal or
356
362
THashKeySymbolLiteral or THashLiteral or THashPattern or THashSplatExpr or
357
363
THashSplatNilParameter or THashSplatParameter or THereDoc or TIdentifierMethodCall or
358
- TIfReal or TIfModifierExpr or TInClause or TInstanceVariableAccessReal or
364
+ TIfReal or TIfModifierExpr or TInClauseReal or TInstanceVariableAccessReal or
359
365
TIntegerLiteralReal or TKeywordParameter or TLEExpr or TLShiftExprReal or TLTExpr or
360
366
TLambda or TLeftAssignmentList or TLine or TLocalVariableAccessReal or
361
367
TLogicalAndExprReal or TLogicalOrExprReal or TMethod or TMatchPattern or
@@ -377,14 +383,14 @@ private module Cached {
377
383
378
384
class TAstNodeSynth =
379
385
TAddExprSynth or TAssignExprSynth or TBitwiseAndExprSynth or TBitwiseOrExprSynth or
380
- TBitwiseXorExprSynth or TBraceBlockSynth or TClassVariableAccessSynth or
381
- TConstantReadAccessSynth or TConstantWriteAccessSynth or TDivExprSynth or
382
- TExponentExprSynth or TGlobalVariableAccessSynth or TIfSynth or
383
- TInstanceVariableAccessSynth or TIntegerLiteralSynth or TLShiftExprSynth or
384
- TLocalVariableAccessSynth or TLogicalAndExprSynth or TLogicalOrExprSynth or
385
- TMethodCallSynth or TModuloExprSynth or TMulExprSynth or TNilLiteralSynth or
386
- TRShiftExprSynth or TRangeLiteralSynth or TSelfSynth or TSimpleParameterSynth or
387
- TSplatExprSynth or TStmtSequenceSynth or TSubExprSynth ;
386
+ TBitwiseXorExprSynth or TBraceBlockSynth or TBooleanLiteralSynth or TCaseMatchSynth or
387
+ TClassVariableAccessSynth or TConstantReadAccessSynth or TConstantWriteAccessSynth or
388
+ TDivExprSynth or TElseSynth or TExponentExprSynth or TGlobalVariableAccessSynth or
389
+ TIfSynth or TInClauseSynth or TInstanceVariableAccessSynth or TIntegerLiteralSynth or
390
+ TLShiftExprSynth or TLocalVariableAccessSynth or TLogicalAndExprSynth or
391
+ TLogicalOrExprSynth or TMethodCallSynth or TModuloExprSynth or TMulExprSynth or
392
+ TNilLiteralSynth or TRShiftExprSynth or TRangeLiteralSynth or TSelfSynth or
393
+ TSimpleParameterSynth or TSplatExprSynth or TStmtSequenceSynth or TSubExprSynth ;
388
394
389
395
/**
390
396
* Gets the underlying TreeSitter entity for a given AST node. This does not
@@ -426,7 +432,7 @@ private module Cached {
426
432
n = TBreakStmt ( result ) or
427
433
n = TCaseEqExpr ( result ) or
428
434
n = TCaseExpr ( result ) or
429
- n = TCaseMatch ( result ) or
435
+ n = TCaseMatchReal ( result ) or
430
436
n = TCharacterLiteral ( result ) or
431
437
n = TClassDeclaration ( result ) or
432
438
n = TClassVariableAccessReal ( result , _) or
@@ -467,7 +473,7 @@ private module Cached {
467
473
n = TIdentifierMethodCall ( result ) or
468
474
n = TIfModifierExpr ( result ) or
469
475
n = TIfReal ( result ) or
470
- n = TInClause ( result ) or
476
+ n = TInClauseReal ( result ) or
471
477
n = TInstanceVariableAccessReal ( result , _) or
472
478
n = TIntegerLiteralReal ( result ) or
473
479
n = TKeywordParameter ( result ) or
@@ -567,8 +573,12 @@ private module Cached {
567
573
or
568
574
result = TBitwiseXorExprSynth ( parent , i )
569
575
or
576
+ result = TBooleanLiteralSynth ( parent , i , _)
577
+ or
570
578
result = TBraceBlockSynth ( parent , i )
571
579
or
580
+ result = TCaseMatchSynth ( parent , i )
581
+ or
572
582
result = TClassVariableAccessSynth ( parent , i , _)
573
583
or
574
584
result = TConstantReadAccessSynth ( parent , i , _)
@@ -577,12 +587,16 @@ private module Cached {
577
587
or
578
588
result = TDivExprSynth ( parent , i )
579
589
or
590
+ result = TElseSynth ( parent , i )
591
+ or
580
592
result = TExponentExprSynth ( parent , i )
581
593
or
582
594
result = TGlobalVariableAccessSynth ( parent , i , _)
583
595
or
584
596
result = TIfSynth ( parent , i )
585
597
or
598
+ result = TInClauseSynth ( parent , i )
599
+ or
586
600
result = TInstanceVariableAccessSynth ( parent , i , _)
587
601
or
588
602
result = TIntegerLiteralSynth ( parent , i , _)
@@ -673,8 +687,12 @@ TAstNodeReal fromGenerated(Ruby::AstNode n) { n = toGenerated(result) }
673
687
674
688
class TCall = TMethodCall or TYieldCall ;
675
689
690
+ class TCaseMatch = TCaseMatchReal or TCaseMatchSynth ;
691
+
676
692
class TCase = TCaseExpr or TCaseMatch ;
677
693
694
+ class TInClause = TInClauseReal or TInClauseSynth ;
695
+
678
696
class TMethodCall =
679
697
TMethodCallSynth or TIdentifierMethodCall or TRegularMethodCall or TElementReference or
680
698
TSuperCall or TUnaryOperation or TBinaryOperation ;
@@ -685,7 +703,7 @@ class TConstantAccess =
685
703
TTokenConstantAccess or TScopeResolutionConstantAccess or TNamespace or
686
704
TConstantReadAccessSynth or TConstantWriteAccessSynth ;
687
705
688
- class TControlExpr = TConditionalExpr or TCaseExpr or TCaseMatch or TLoop ;
706
+ class TControlExpr = TConditionalExpr or TCaseExpr or TCaseMatchReal or TCaseMatchSynth or TLoop ;
689
707
690
708
class TConditionalExpr =
691
709
TIfExpr or TUnlessExpr or TIfModifierExpr or TUnlessModifierExpr or TTernaryIfExpr ;
@@ -711,8 +729,9 @@ class TExpr =
711
729
class TSplatExpr = TSplatExprReal or TSplatExprSynth ;
712
730
713
731
class TStmtSequence =
714
- TBeginBlock or TEndBlock or TThen or TElse or TDo or TEnsure or TStringInterpolationComponent or
715
- TBlock or TBodyStmt or TParenthesizedExpr or TStmtSequenceSynth ;
732
+ TBeginBlock or TEndBlock or TThen or TElse or TElseSynth or TDo or TEnsure or
733
+ TStringInterpolationComponent or TBlock or TBodyStmt or TParenthesizedExpr or
734
+ TStmtSequenceSynth ;
716
735
717
736
class TBodyStmt = TBeginExpr or TModuleBase or TMethod or TLambda or TDoBlock or TSingletonMethod ;
718
737
@@ -727,7 +746,7 @@ class TNumericLiteral = TIntegerLiteral or TFloatLiteral or TRationalLiteral or
727
746
728
747
class TIntegerLiteral = TIntegerLiteralReal or TIntegerLiteralSynth ;
729
748
730
- class TBooleanLiteral = TTrueLiteral or TFalseLiteral ;
749
+ class TBooleanLiteral = TTrueLiteral or TFalseLiteral or TBooleanLiteralSynth ;
731
750
732
751
class TStringTextComponentNonRegexp =
733
752
TStringTextComponentNonRegexpStringOrHeredocContent or
0 commit comments