mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
add hasLocationInfo predicate to regexp terms
This commit is contained in:
@@ -176,6 +176,13 @@ class RegExpTerm extends Locatable, @regexpterm {
|
|||||||
* Gets a string that is matched by this regular-expression term.
|
* Gets a string that is matched by this regular-expression term.
|
||||||
*/
|
*/
|
||||||
string getAMatchedString() { result = this.getConstantValue() }
|
string getAMatchedString() { result = this.getConstantValue() }
|
||||||
|
|
||||||
|
/** Holds if this term has the specified location. */
|
||||||
|
predicate hasLocationInfo(
|
||||||
|
string filepath, int startline, int startcolumn, int endline, int endcolumn
|
||||||
|
) {
|
||||||
|
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user