QL: Use more precise type for getParameter

This commit is contained in:
Taus
2022-06-13 15:53:47 +00:00
committed by GitHub
parent 81e41106e7
commit 5a214afdb8
5 changed files with 4 additions and 6 deletions

BIN
ql/Cargo.lock generated

Binary file not shown.

View File

@@ -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 = "91cdab850c2b6d97d1211da0423adb53c67fef3e" }
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "67f75344593b90c40201c6f895207fe9ddb4442b" }
clap = "2.33"
tracing = "0.1"
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }

View File

@@ -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 = "91cdab850c2b6d97d1211da0423adb53c67fef3e" }
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "67f75344593b90c40201c6f895207fe9ddb4442b" }

View File

@@ -951,7 +951,7 @@ module QL {
final ModuleName getName() { ql_module_def(this, result) }
/** Gets the node corresponding to the field `parameter`. */
final AstNode getParameter(int i) { ql_module_parameter(this, i, result) }
final ModuleParam getParameter(int i) { ql_module_parameter(this, i, result) }
/** Gets the `i`th child of this node. */
final AstNode getChild(int i) { ql_module_child(this, i, result) }

View File

@@ -610,13 +610,11 @@ ql_module_implements(
unique int implements: @ql_module_implements_type ref
);
@ql_module_parameter_type = @ql_module_param | @ql_reserved_word
#keyset[ql_module, index]
ql_module_parameter(
int ql_module: @ql_module ref,
int index: int ref,
unique int parameter: @ql_module_parameter_type ref
unique int parameter: @ql_module_param ref
);
@ql_module_child_type = @ql_module_alias_body | @ql_module_member