mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
QL: Allow module applications to the right of ::
This commit is contained in:
BIN
ql/Cargo.lock
generated
BIN
ql/Cargo.lock
generated
Binary file not shown.
@@ -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 = "99f3bc30fa772b07ad19a23799fe7433dc15f765" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "c3d626a77cf5acc5d8c11aaf91c12348880c8eca" }
|
||||
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 = "99f3bc30fa772b07ad19a23799fe7433dc15f765" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "c3d626a77cf5acc5d8c11aaf91c12348880c8eca" }
|
||||
|
||||
@@ -2187,7 +2187,7 @@ class ModuleExpr extends TModuleExpr, ModuleRef {
|
||||
* is `Bar`.
|
||||
*/
|
||||
string getName() {
|
||||
result = me.getName().getValue()
|
||||
result = me.getName().(QL::SimpleId).getValue()
|
||||
or
|
||||
not exists(me.getName()) and result = me.getChild().(QL::SimpleId).getValue()
|
||||
}
|
||||
|
||||
@@ -983,7 +983,7 @@ module QL {
|
||||
final override string getAPrimaryQlClass() { result = "ModuleExpr" }
|
||||
|
||||
/** Gets the node corresponding to the field `name`. */
|
||||
final SimpleId getName() { ql_module_expr_name(this, result) }
|
||||
final AstNode getName() { ql_module_expr_name(this, result) }
|
||||
|
||||
/** Gets the child of this node. */
|
||||
final AstNode getChild() { ql_module_expr_def(this, result) }
|
||||
|
||||
@@ -634,9 +634,11 @@ ql_module_alias_body_def(
|
||||
int child: @ql_module_expr ref
|
||||
);
|
||||
|
||||
@ql_moduleExpr_name_type = @ql_module_instantiation | @ql_token_simple_id
|
||||
|
||||
ql_module_expr_name(
|
||||
unique int ql_module_expr: @ql_module_expr ref,
|
||||
unique int name: @ql_token_simple_id ref
|
||||
unique int name: @ql_moduleExpr_name_type ref
|
||||
);
|
||||
|
||||
@ql_moduleExpr_child_type = @ql_module_expr | @ql_module_instantiation | @ql_token_simple_id
|
||||
|
||||
Reference in New Issue
Block a user