@@ -46,7 +46,7 @@ class ExprCfgNode extends AstCfgNode {
4646
4747 Expr e ;
4848
49- ExprCfgNode ( ) { e = this .getNode ( ) }
49+ ExprCfgNode ( ) { e = this .getAstNode ( ) }
5050
5151 /** Gets the underlying expression. */
5252 Expr getExpr ( ) { result = e }
@@ -61,30 +61,32 @@ class ReturningCfgNode extends AstCfgNode {
6161
6262 ReturningStmt s ;
6363
64- ReturningCfgNode ( ) { s = this .getNode ( ) }
64+ ReturningCfgNode ( ) { s = this .getAstNode ( ) }
6565
6666 /** Gets the node of the returned value, if any. */
6767 ExprCfgNode getReturnedValueNode ( ) {
6868 result = this .getAPredecessor ( ) and
69- result .getNode ( ) = s .getValue ( )
69+ result .getAstNode ( ) = s .getValue ( )
7070 }
7171}
7272
7373/** A control-flow node that wraps a `StringComponent` AST expression. */
7474class StringComponentCfgNode extends AstCfgNode {
7575 override string getAPrimaryQlClass ( ) { result = "StringComponentCfgNode" }
7676
77- StringComponentCfgNode ( ) { this .getNode ( ) instanceof StringComponent }
77+ StringComponentCfgNode ( ) { this .getAstNode ( ) instanceof StringComponent }
7878
7979 /** Gets the constant value of this string component. */
80- ConstantValue getConstantValue ( ) { result = this .getNode ( ) .( StringComponent ) .getConstantValue ( ) }
80+ ConstantValue getConstantValue ( ) {
81+ result = this .getAstNode ( ) .( StringComponent ) .getConstantValue ( )
82+ }
8183}
8284
8385/** A control-flow node that wraps a `RegExpComponent` AST expression. */
8486class RegExpComponentCfgNode extends StringComponentCfgNode {
8587 override string getAPrimaryQlClass ( ) { result = "RegExpComponentCfgNode" }
8688
87- RegExpComponentCfgNode ( ) { this .getNode ( ) instanceof RegExpComponent }
89+ RegExpComponentCfgNode ( ) { this .getAstNode ( ) instanceof RegExpComponent }
8890}
8991
9092private AstNode desugar ( AstNode n ) {
@@ -117,7 +119,7 @@ abstract private class ChildMapping extends AstNode {
117119 cached
118120 predicate hasCfgChild ( AstNode child , CfgNode cfn , CfgNode cfnChild ) {
119121 this .reachesBasicBlock ( child , cfn , cfnChild .getBasicBlock ( ) ) and
120- cfnChild .getNode ( ) = desugar ( child )
122+ cfnChild .getAstNode ( ) = desugar ( child )
121123 }
122124}
123125
@@ -134,7 +136,7 @@ abstract private class ExprChildMapping extends Expr, ChildMapping {
134136 exists ( BasicBlock mid |
135137 this .reachesBasicBlock ( child , cfn , mid ) and
136138 bb = mid .getAPredecessor ( ) and
137- not mid .getANode ( ) .getNode ( ) = child
139+ not mid .getANode ( ) .getAstNode ( ) = child
138140 )
139141 }
140142}
@@ -148,13 +150,13 @@ abstract private class NonExprChildMapping extends ChildMapping {
148150 pragma [ nomagic]
149151 override predicate reachesBasicBlock ( AstNode child , CfgNode cfn , BasicBlock bb ) {
150152 this .relevantChild ( child ) and
151- cfn .getNode ( ) = this and
153+ cfn .getAstNode ( ) = this and
152154 bb .getANode ( ) = cfn
153155 or
154156 exists ( BasicBlock mid |
155157 this .reachesBasicBlock ( child , cfn , mid ) and
156158 bb = mid .getASuccessor ( ) and
157- not mid .getANode ( ) .getNode ( ) = child
159+ not mid .getANode ( ) .getAstNode ( ) = child
158160 )
159161 }
160162}
@@ -380,7 +382,7 @@ module ExprNodes {
380382 class InClauseCfgNode extends AstCfgNode {
381383 private InClauseChildMapping e ;
382384
383- InClauseCfgNode ( ) { e = this .getNode ( ) }
385+ InClauseCfgNode ( ) { e = this .getAstNode ( ) }
384386
385387 override string getAPrimaryQlClass ( ) { result = "InClauseCfgNode" }
386388
@@ -400,28 +402,28 @@ module ExprNodes {
400402 predicate patternReachesBasicBlock ( int i , CfgNode cfnPattern , BasicBlock bb ) {
401403 exists ( Expr pattern |
402404 pattern = this .getPattern ( i ) and
403- cfnPattern .getNode ( ) = pattern and
405+ cfnPattern .getAstNode ( ) = pattern and
404406 bb .getANode ( ) = cfnPattern
405407 )
406408 or
407409 exists ( BasicBlock mid |
408410 this .patternReachesBasicBlock ( i , cfnPattern , mid ) and
409411 bb = mid .getASuccessor ( ) and
410- not mid .getANode ( ) .getNode ( ) = this
412+ not mid .getANode ( ) .getAstNode ( ) = this
411413 )
412414 }
413415
414416 predicate bodyReachesBasicBlock ( CfgNode cfnBody , BasicBlock bb ) {
415417 exists ( Stmt body |
416418 body = this .getBody ( ) and
417- cfnBody .getNode ( ) = body and
419+ cfnBody .getAstNode ( ) = body and
418420 bb .getANode ( ) = cfnBody
419421 )
420422 or
421423 exists ( BasicBlock mid |
422424 this .bodyReachesBasicBlock ( cfnBody , mid ) and
423425 bb = mid .getAPredecessor ( ) and
424- not mid .getANode ( ) .getNode ( ) = this
426+ not mid .getANode ( ) .getAstNode ( ) = this
425427 )
426428 }
427429 }
@@ -430,19 +432,19 @@ module ExprNodes {
430432 class WhenClauseCfgNode extends AstCfgNode {
431433 private WhenClauseChildMapping e ;
432434
433- WhenClauseCfgNode ( ) { e = this .getNode ( ) }
435+ WhenClauseCfgNode ( ) { e = this .getAstNode ( ) }
434436
435437 override string getAPrimaryQlClass ( ) { result = "WhenClauseCfgNode" }
436438
437439 /** Gets the body of this `when`-clause. */
438440 final ExprCfgNode getBody ( ) {
439- result .getNode ( ) = desugar ( e .getBody ( ) ) and
441+ result .getAstNode ( ) = desugar ( e .getBody ( ) ) and
440442 e .bodyReachesBasicBlock ( result , this .getBasicBlock ( ) )
441443 }
442444
443445 /** Gets the `i`th pattern this `when`-clause. */
444446 final ExprCfgNode getPattern ( int i ) {
445- result .getNode ( ) = desugar ( e .getPattern ( i ) ) and
447+ result .getAstNode ( ) = desugar ( e .getPattern ( i ) ) and
446448 e .patternReachesBasicBlock ( i , result , this .getBasicBlock ( ) )
447449 }
448450 }
@@ -451,7 +453,7 @@ module ExprNodes {
451453 class CasePatternCfgNode extends AstCfgNode {
452454 CasePattern e ;
453455
454- CasePatternCfgNode ( ) { e = this .getNode ( ) }
456+ CasePatternCfgNode ( ) { e = this .getAstNode ( ) }
455457
456458 override string getAPrimaryQlClass ( ) { result = "CasePatternCfgNode" }
457459 }
@@ -815,7 +817,7 @@ module ExprNodes {
815817
816818 /** A control-flow node that wraps an `InstanceVariableReadAccess` AST expression. */
817819 class InstanceVariableReadAccessCfgNode extends InstanceVariableAccessCfgNode {
818- InstanceVariableReadAccessCfgNode ( ) { this .getNode ( ) instanceof InstanceVariableReadAccess }
820+ InstanceVariableReadAccessCfgNode ( ) { this .getAstNode ( ) instanceof InstanceVariableReadAccess }
819821
820822 override string getAPrimaryQlClass ( ) { result = "InstanceVariableReadAccessCfgNode" }
821823
@@ -824,7 +826,9 @@ module ExprNodes {
824826
825827 /** A control-flow node that wraps an `InstanceVariableWriteAccess` AST expression. */
826828 class InstanceVariableWriteAccessCfgNode extends InstanceVariableAccessCfgNode {
827- InstanceVariableWriteAccessCfgNode ( ) { this .getNode ( ) instanceof InstanceVariableWriteAccess }
829+ InstanceVariableWriteAccessCfgNode ( ) {
830+ this .getAstNode ( ) instanceof InstanceVariableWriteAccess
831+ }
828832
829833 override string getAPrimaryQlClass ( ) { result = "InstanceVariableWriteAccessCfgNode" }
830834
@@ -835,7 +839,9 @@ module ExprNodes {
835839 class StringInterpolationComponentCfgNode extends StringComponentCfgNode , StmtSequenceCfgNode {
836840 override string getAPrimaryQlClass ( ) { result = "StringInterpolationComponentCfgNode" }
837841
838- StringInterpolationComponentCfgNode ( ) { this .getNode ( ) instanceof StringInterpolationComponent }
842+ StringInterpolationComponentCfgNode ( ) {
843+ this .getAstNode ( ) instanceof StringInterpolationComponent
844+ }
839845
840846 final override ConstantValue getConstantValue ( ) {
841847 result = StmtSequenceCfgNode .super .getConstantValue ( )
@@ -846,7 +852,9 @@ module ExprNodes {
846852 class RegExpInterpolationComponentCfgNode extends RegExpComponentCfgNode , StmtSequenceCfgNode {
847853 override string getAPrimaryQlClass ( ) { result = "RegExpInterpolationComponentCfgNode" }
848854
849- RegExpInterpolationComponentCfgNode ( ) { this .getNode ( ) instanceof RegExpInterpolationComponent }
855+ RegExpInterpolationComponentCfgNode ( ) {
856+ this .getAstNode ( ) instanceof RegExpInterpolationComponent
857+ }
850858
851859 final override ConstantValue getConstantValue ( ) {
852860 result = StmtSequenceCfgNode .super .getConstantValue ( )
0 commit comments