зеркало из https://github.com/github/codeql.git
Add fields to `ModuleParam` children
This commit is contained in:
Родитель
0b8656e625
Коммит
8c46846b82
|
@ -514,7 +514,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "tree-sitter-ql"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=7928a971a9a408f7ad59876c2ecda4a5329a6795#7928a971a9a408f7ad59876c2ecda4a5329a6795"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=a8e519e676ff6e7aa9c1d0a8a329edefcaac69ae#a8e519e676ff6e7aa9c1d0a8a329edefcaac69ae"
|
||||
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 = "7928a971a9a408f7ad59876c2ecda4a5329a6795" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "a8e519e676ff6e7aa9c1d0a8a329edefcaac69ae" }
|
||||
clap = "2.33"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||
|
|
|
@ -11,4 +11,4 @@ clap = "2.33"
|
|||
node-types = { path = "../node-types" }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "7928a971a9a408f7ad59876c2ecda4a5329a6795" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "a8e519e676ff6e7aa9c1d0a8a329edefcaac69ae" }
|
||||
|
|
|
@ -1035,11 +1035,16 @@ module QL {
|
|||
/** Gets the name of the primary QL class for this element. */
|
||||
final override string getAPrimaryQlClass() { result = "ModuleParam" }
|
||||
|
||||
/** Gets the `i`th child of this node. */
|
||||
final AstNode getChild(int i) { ql_module_param_child(this, i, result) }
|
||||
/** Gets the node corresponding to the field `parameter`. */
|
||||
final SimpleId getParameter() { ql_module_param_def(this, result, _) }
|
||||
|
||||
/** Gets the node corresponding to the field `signature`. */
|
||||
final SignatureExpr getSignature() { ql_module_param_def(this, _, result) }
|
||||
|
||||
/** Gets a field or child node of this node. */
|
||||
final override AstNode getAFieldOrChild() { ql_module_param_child(this, _, result) }
|
||||
final override AstNode getAFieldOrChild() {
|
||||
ql_module_param_def(this, result, _) or ql_module_param_def(this, _, result)
|
||||
}
|
||||
}
|
||||
|
||||
/** A class representing `mul_expr` nodes. */
|
||||
|
|
|
@ -679,17 +679,10 @@ ql_module_name_def(
|
|||
int child: @ql_token_simple_id ref
|
||||
);
|
||||
|
||||
@ql_moduleParam_child_type = @ql_signature_expr | @ql_token_simple_id
|
||||
|
||||
#keyset[ql_module_param, index]
|
||||
ql_module_param_child(
|
||||
int ql_module_param: @ql_module_param ref,
|
||||
int index: int ref,
|
||||
unique int child: @ql_moduleParam_child_type ref
|
||||
);
|
||||
|
||||
ql_module_param_def(
|
||||
unique int id: @ql_module_param
|
||||
unique int id: @ql_module_param,
|
||||
int parameter: @ql_token_simple_id ref,
|
||||
int signature: @ql_signature_expr ref
|
||||
);
|
||||
|
||||
@ql_mul_expr_left_type = @ql_add_expr | @ql_aggregate | @ql_call_or_unqual_agg_expr | @ql_comp_term | @ql_conjunction | @ql_disjunction | @ql_expr_annotation | @ql_if_term | @ql_implication | @ql_in_expr | @ql_instance_of | @ql_literal | @ql_mul_expr | @ql_negation | @ql_par_expr | @ql_prefix_cast | @ql_qualified_expr | @ql_quantified | @ql_range | @ql_set_literal | @ql_special_call | @ql_super_ref | @ql_unary_expr | @ql_variable
|
||||
|
|
Загрузка…
Ссылка в новой задаче