mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Fix perfomance issues in overlay mode.
This commit is contained in:
@@ -28,8 +28,10 @@ class Token extends Locatable, @token {
|
|||||||
|
|
||||||
/** Gets the token following this token inside the same toplevel structure, if any. */
|
/** Gets the token following this token inside the same toplevel structure, if any. */
|
||||||
Token getNextToken() {
|
Token getNextToken() {
|
||||||
this.getTopLevel() = result.getTopLevel() and
|
exists (TopLevel topLevel, int index |
|
||||||
this.getIndex() + 1 = result.getIndex()
|
tokeninfo(this, _, topLevel, index, _) and
|
||||||
|
tokeninfo(result, _, topLevel, index + 1, _)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Gets the token preceding this token inside the same toplevel structure, if any. */
|
/** Gets the token preceding this token inside the same toplevel structure, if any. */
|
||||||
|
|||||||
Reference in New Issue
Block a user