@@ -56,7 +56,7 @@ class Node extends TNode {
56
56
Node getASuccessor ( ) { localFlowStep ( this , result ) }
57
57
58
58
/** Gets the constant value of this expression, if any. */
59
- ConstantValue getConstantValue ( ) { result = asExpr ( ) .getExpr ( ) .getConstantValue ( ) }
59
+ ConstantValue getConstantValue ( ) { result = this . asExpr ( ) .getExpr ( ) .getConstantValue ( ) }
60
60
61
61
/**
62
62
* Gets the callable corresponding to this block, lambda expression, or call to `proc` or `lambda`.
@@ -160,7 +160,7 @@ class CallNode extends LocalSourceNode, ExprNode {
160
160
* ```
161
161
*/
162
162
class SetterCallNode extends CallNode {
163
- SetterCallNode ( ) { asExpr ( ) .getExpr ( ) instanceof SetterMethodCall }
163
+ SetterCallNode ( ) { this . asExpr ( ) .getExpr ( ) instanceof SetterMethodCall }
164
164
165
165
/**
166
166
* Gets the name of the method being called without the trailing `=`. For example, in the following
@@ -170,7 +170,9 @@ class SetterCallNode extends CallNode {
170
170
* foo.value = 1
171
171
* ```
172
172
*/
173
- final string getTargetName ( ) { result = asExpr ( ) .getExpr ( ) .( SetterMethodCall ) .getTargetName ( ) }
173
+ final string getTargetName ( ) {
174
+ result = this .asExpr ( ) .getExpr ( ) .( SetterMethodCall ) .getTargetName ( )
175
+ }
174
176
}
175
177
176
178
/**
@@ -958,32 +960,34 @@ class CallableNode extends ExprNode {
958
960
}
959
961
960
962
/** Gets the `n`th positional parameter. */
961
- ParameterNode getParameter ( int n ) { getParameterPosition ( result ) .isPositional ( n ) }
963
+ ParameterNode getParameter ( int n ) { this . getParameterPosition ( result ) .isPositional ( n ) }
962
964
963
965
/** Gets the keyword parameter of the given name. */
964
- ParameterNode getKeywordParameter ( string name ) { getParameterPosition ( result ) .isKeyword ( name ) }
966
+ ParameterNode getKeywordParameter ( string name ) {
967
+ this .getParameterPosition ( result ) .isKeyword ( name )
968
+ }
965
969
966
970
/** Gets the `self` parameter of this callable, if any. */
967
- ParameterNode getSelfParameter ( ) { getParameterPosition ( result ) .isSelf ( ) }
971
+ ParameterNode getSelfParameter ( ) { this . getParameterPosition ( result ) .isSelf ( ) }
968
972
969
973
/**
970
974
* Gets the `hash-splat` parameter. This is a synthetic parameter holding
971
975
* a hash object with entries for each keyword argument passed to the function.
972
976
*/
973
- ParameterNode getHashSplatParameter ( ) { getParameterPosition ( result ) .isHashSplat ( ) }
977
+ ParameterNode getHashSplatParameter ( ) { this . getParameterPosition ( result ) .isHashSplat ( ) }
974
978
975
979
/**
976
980
* Gets the block parameter of this method, if any.
977
981
*/
978
- ParameterNode getBlockParameter ( ) { getParameterPosition ( result ) .isBlock ( ) }
982
+ ParameterNode getBlockParameter ( ) { this . getParameterPosition ( result ) .isBlock ( ) }
979
983
980
984
/**
981
985
* Gets a `yield` in this method call or `.call` on the block parameter.
982
986
*/
983
987
CallNode getABlockCall ( ) {
984
- hasYieldCall ( getBlockParameter ( ) , result )
988
+ hasYieldCall ( this . getBlockParameter ( ) , result )
985
989
or
986
- result = getBlockParameter ( ) .getAMethodCall ( "call" )
990
+ result = this . getBlockParameter ( ) .getAMethodCall ( "call" )
987
991
}
988
992
989
993
/**
@@ -1011,7 +1015,7 @@ class MethodNode extends CallableNode {
1011
1015
MethodBase asMethod ( ) { result = this .asCallableAstNode ( ) }
1012
1016
1013
1017
/** Gets the name of this method. */
1014
- string getMethodName ( ) { result = asMethod ( ) .getName ( ) }
1018
+ string getMethodName ( ) { result = this . asMethod ( ) .getName ( ) }
1015
1019
}
1016
1020
1017
1021
/**
@@ -1032,14 +1036,14 @@ class BlockNode extends CallableNode {
1032
1036
* This node simply provides convenient access to the key and value as data flow nodes.
1033
1037
*/
1034
1038
class PairNode extends ExprNode {
1035
- PairNode ( ) { getExprNode ( ) instanceof CfgNodes:: ExprNodes:: PairCfgNode }
1039
+ PairNode ( ) { this . getExprNode ( ) instanceof CfgNodes:: ExprNodes:: PairCfgNode }
1036
1040
1037
1041
/**
1038
1042
* Holds if this pair is of form `key => value` or `key: value`.
1039
1043
*/
1040
1044
predicate hasKeyAndValue ( Node key , Node value ) {
1041
1045
exists ( CfgNodes:: ExprNodes:: PairCfgNode n |
1042
- getExprNode ( ) = n and
1046
+ this . getExprNode ( ) = n and
1043
1047
key = TExprNode ( n .getKey ( ) ) and
1044
1048
value = TExprNode ( n .getValue ( ) )
1045
1049
)
0 commit comments