mirror of
https://github.com/github/codeql.git
synced 2026-03-20 14:36:46 +01:00
Parameters and local variables: add isAnonymous predicate
This commit is contained in:
@@ -117,4 +117,11 @@ class Parameter extends Element, @param, LocalScopeVariable {
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "Parameter" }
|
||||
|
||||
override string toString() {
|
||||
if this.getName() = "" then result = "<anonymous parameter>" else result = super.toString()
|
||||
}
|
||||
|
||||
/** Holds if this is an anonymous parameter, `_` */
|
||||
predicate isAnonymous() { this.getName() = "" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user