File tree 3 files changed +21
-0
lines changed
csharp/ql/lib/semmle/code/csharp/dataflow/internal
java/ql/lib/semmle/code/java/dataflow/internal
javascript/ql/lib/semmle/javascript/frameworks/data/internal
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -167,9 +167,16 @@ class AccessPathToken extends string {
167
167
/** Gets the `n`th argument to this token, such as `x` or `y` from `Member[x,y]`. */
168
168
string getArgument ( int n ) { result = this .getArgumentList ( ) .splitAt ( "," , n ) .trim ( ) }
169
169
170
+ /** Gets the `n`th argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
171
+ pragma [ nomagic]
172
+ string getArgument ( string name , int n ) { name = this .getName ( ) and result = this .getArgument ( n ) }
173
+
170
174
/** Gets an argument to this token, such as `x` or `y` from `Member[x,y]`. */
171
175
string getAnArgument ( ) { result = this .getArgument ( _) }
172
176
177
+ /** Gets an argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
178
+ string getAnArgument ( string name ) { result = this .getArgument ( name , _) }
179
+
173
180
/** Gets the number of arguments to this token, such as 2 for `Member[x,y]` or zero for `ReturnValue`. */
174
181
int getNumArgument ( ) { result = count ( int n | exists ( this .getArgument ( n ) ) ) }
175
182
}
Original file line number Diff line number Diff line change @@ -167,9 +167,16 @@ class AccessPathToken extends string {
167
167
/** Gets the `n`th argument to this token, such as `x` or `y` from `Member[x,y]`. */
168
168
string getArgument ( int n ) { result = this .getArgumentList ( ) .splitAt ( "," , n ) .trim ( ) }
169
169
170
+ /** Gets the `n`th argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
171
+ pragma [ nomagic]
172
+ string getArgument ( string name , int n ) { name = this .getName ( ) and result = this .getArgument ( n ) }
173
+
170
174
/** Gets an argument to this token, such as `x` or `y` from `Member[x,y]`. */
171
175
string getAnArgument ( ) { result = this .getArgument ( _) }
172
176
177
+ /** Gets an argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
178
+ string getAnArgument ( string name ) { result = this .getArgument ( name , _) }
179
+
173
180
/** Gets the number of arguments to this token, such as 2 for `Member[x,y]` or zero for `ReturnValue`. */
174
181
int getNumArgument ( ) { result = count ( int n | exists ( this .getArgument ( n ) ) ) }
175
182
}
Original file line number Diff line number Diff line change @@ -167,9 +167,16 @@ class AccessPathToken extends string {
167
167
/** Gets the `n`th argument to this token, such as `x` or `y` from `Member[x,y]`. */
168
168
string getArgument ( int n ) { result = this .getArgumentList ( ) .splitAt ( "," , n ) .trim ( ) }
169
169
170
+ /** Gets the `n`th argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
171
+ pragma [ nomagic]
172
+ string getArgument ( string name , int n ) { name = this .getName ( ) and result = this .getArgument ( n ) }
173
+
170
174
/** Gets an argument to this token, such as `x` or `y` from `Member[x,y]`. */
171
175
string getAnArgument ( ) { result = this .getArgument ( _) }
172
176
177
+ /** Gets an argument to this `name` token, such as `x` or `y` from `Member[x,y]`. */
178
+ string getAnArgument ( string name ) { result = this .getArgument ( name , _) }
179
+
173
180
/** Gets the number of arguments to this token, such as 2 for `Member[x,y]` or zero for `ReturnValue`. */
174
181
int getNumArgument ( ) { result = count ( int n | exists ( this .getArgument ( n ) ) ) }
175
182
}
You can’t perform that action at this time.
0 commit comments