mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
JS: Specialize ASTNode.getFile
This commit is contained in:
@@ -23,6 +23,10 @@ import javascript
|
||||
class ASTNode extends @ast_node, Locatable {
|
||||
override Location getLocation() { hasLocation(this, result) }
|
||||
|
||||
override File getFile() {
|
||||
result = getLocation().getFile() // Specialized for performance reasons
|
||||
}
|
||||
|
||||
/** Gets the first token belonging to this element. */
|
||||
Token getFirstToken() {
|
||||
exists(Location l1, Location l2 |
|
||||
|
||||
Reference in New Issue
Block a user