mirror of
https://github.com/github/codeql.git
synced 2026-02-08 19:21:07 +01:00
Record annotation names in the AST
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -589,7 +589,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tree-sitter-ql"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=064e438e92a89d99a2b061eca39e0ea225e32341#064e438e92a89d99a2b061eca39e0ea225e32341"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=dee83b7a1c159f2c71d8d3d3bce3ee1203ed653a#dee83b7a1c159f2c71d8d3d3bce3ee1203ed653a"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
|
||||
@@ -10,7 +10,7 @@ edition = "2018"
|
||||
flate2 = "1.0"
|
||||
node-types = { path = "../node-types" }
|
||||
tree-sitter = "0.19"
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "064e438e92a89d99a2b061eca39e0ea225e32341" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "dee83b7a1c159f2c71d8d3d3bce3ee1203ed653a" }
|
||||
clap = "2.33"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
|
||||
|
||||
@@ -10,4 +10,4 @@ edition = "2018"
|
||||
node-types = { path = "../node-types" }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "064e438e92a89d99a2b061eca39e0ea225e32341" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "dee83b7a1c159f2c71d8d3d3bce3ee1203ed653a" }
|
||||
|
||||
@@ -350,11 +350,19 @@ module Generated {
|
||||
class ExprAnnotation extends @expr_annotation, AstNode {
|
||||
override string getAPrimaryQlClass() { result = "ExprAnnotation" }
|
||||
|
||||
override Location getLocation() { expr_annotation_def(this, _, result) }
|
||||
override Location getLocation() { expr_annotation_def(this, _, _, _, result) }
|
||||
|
||||
AstNode getChild() { expr_annotation_def(this, result, _) }
|
||||
AnnotName getAnnotArg() { expr_annotation_def(this, result, _, _, _) }
|
||||
|
||||
override AstNode getAFieldOrChild() { expr_annotation_def(this, result, _) }
|
||||
AnnotName getName() { expr_annotation_def(this, _, result, _, _) }
|
||||
|
||||
AstNode getChild() { expr_annotation_def(this, _, _, result, _) }
|
||||
|
||||
override AstNode getAFieldOrChild() {
|
||||
expr_annotation_def(this, result, _, _, _) or
|
||||
expr_annotation_def(this, _, result, _, _) or
|
||||
expr_annotation_def(this, _, _, result, _)
|
||||
}
|
||||
}
|
||||
|
||||
class False extends @token_false, Token {
|
||||
|
||||
@@ -323,6 +323,8 @@ expr_aggregate_body_def(
|
||||
|
||||
expr_annotation_def(
|
||||
unique int id: @expr_annotation,
|
||||
int annot_arg: @token_annot_name ref,
|
||||
int name: @token_annot_name ref,
|
||||
int child: @expr_annotation_child_type ref,
|
||||
int loc: @location ref
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user