Java: use AccessPathSyntax.qll to parse input/output summary specs

This commit is contained in:
Asger Feldthaus
2022-02-04 19:20:17 +01:00
parent 53935db6c6
commit 753c557dbe
6 changed files with 187 additions and 89 deletions

View File

@@ -47,6 +47,9 @@ class AccessPath extends string instanceof AccessPath::Range {
result = count(int n | exists(this.getRawToken(n))) and
not hasSyntaxError()
}
/** Gets the `n`th-last token, with 0 being the last token. */
AccessPathToken getLastToken(int n) { result = getToken(getNumToken() - 1 - n) }
}
/**