Skip to content

Commit 06091e5

Browse files
committed
cache AstNode::getParent
1 parent b4e6f92 commit 06091e5

File tree

1 file changed

+1
-0
lines changed
  • javascript/ql/src/semmle/javascript

1 file changed

+1
-0
lines changed

javascript/ql/src/semmle/javascript/AST.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ class ASTNode extends @ast_node, NodeInStmtContainer {
118118
int getNumChildStmt() { result = count(getAChildStmt()) }
119119

120120
/** Gets the parent node of this node, if any. */
121+
cached
121122
ASTNode getParent() { this = result.getAChild() }
122123

123124
/** Gets the first control flow node belonging to this syntactic entity. */

0 commit comments

Comments
 (0)