Skip to content
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

Commit 36497ad

Browse files
authored
QL: Merge pull request #6 from github/support-expr-annotations
Support expression annotations
2 parents 8493f51 + 6f8f0bb commit 36497ad

File tree

5 files changed

+60
-42
lines changed

5 files changed

+60
-42
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extractor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2018"
1010
flate2 = "1.0"
1111
node-types = { path = "../node-types" }
1212
tree-sitter = "0.19"
13-
tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql.git", rev = "965948cce9a94a710b1339851e0919471ad5ee2c" }
13+
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "064e438e92a89d99a2b061eca39e0ea225e32341" }
1414
clap = "2.33"
1515
tracing = "0.1"
1616
tracing-subscriber = { version = "0.2", features = ["env-filter"] }

generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ edition = "2018"
1010
node-types = { path = "../node-types" }
1111
tracing = "0.1"
1212
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
13-
tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql.git", rev = "965948cce9a94a710b1339851e0919471ad5ee2c" }
13+
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "064e438e92a89d99a2b061eca39e0ea225e32341" }

ql/src/codeql_ql/ast/internal/TreeSitter.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,16 @@ module Generated {
347347
override AstNode getAFieldOrChild() { expr_aggregate_body_child(this, _, result) }
348348
}
349349

350+
class ExprAnnotation extends @expr_annotation, AstNode {
351+
override string getAPrimaryQlClass() { result = "ExprAnnotation" }
352+
353+
override Location getLocation() { expr_annotation_def(this, _, result) }
354+
355+
AstNode getChild() { expr_annotation_def(this, result, _) }
356+
357+
override AstNode getAFieldOrChild() { expr_annotation_def(this, result, _) }
358+
}
359+
350360
class False extends @token_false, Token {
351361
override string getAPrimaryQlClass() { result = "False" }
352362
}

0 commit comments

Comments
 (0)