Skip to content

Commit 73a807c

Browse files
authored
QL: Allow module applications to the right of ::
1 parent 5d306c9 commit 73a807c

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

ql/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.

ql/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/tausbn/tree-sitter-ql.git", rev = "99f3bc30fa772b07ad19a23799fe7433dc15f765" }
13+
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "c3d626a77cf5acc5d8c11aaf91c12348880c8eca" }
1414
clap = "2.33"
1515
tracing = "0.1"
1616
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }

ql/generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ clap = "2.33"
1111
node-types = { path = "../node-types" }
1212
tracing = "0.1"
1313
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
14-
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "99f3bc30fa772b07ad19a23799fe7433dc15f765" }
14+
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "c3d626a77cf5acc5d8c11aaf91c12348880c8eca" }

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ class ModuleExpr extends TModuleExpr, ModuleRef {
21872187
* is `Bar`.
21882188
*/
21892189
string getName() {
2190-
result = me.getName().getValue()
2190+
result = me.getName().(QL::SimpleId).getValue()
21912191
or
21922192
not exists(me.getName()) and result = me.getChild().(QL::SimpleId).getValue()
21932193
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ module QL {
983983
final override string getAPrimaryQlClass() { result = "ModuleExpr" }
984984

985985
/** Gets the node corresponding to the field `name`. */
986-
final SimpleId getName() { ql_module_expr_name(this, result) }
986+
final AstNode getName() { ql_module_expr_name(this, result) }
987987

988988
/** Gets the child of this node. */
989989
final AstNode getChild() { ql_module_expr_def(this, result) }

ql/ql/src/ql.dbscheme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,11 @@ ql_module_alias_body_def(
634634
int child: @ql_module_expr ref
635635
);
636636

637+
@ql_moduleExpr_name_type = @ql_module_instantiation | @ql_token_simple_id
638+
637639
ql_module_expr_name(
638640
unique int ql_module_expr: @ql_module_expr ref,
639-
unique int name: @ql_token_simple_id ref
641+
unique int name: @ql_moduleExpr_name_type ref
640642
);
641643

642644
@ql_moduleExpr_child_type = @ql_module_expr | @ql_module_instantiation | @ql_token_simple_id

0 commit comments

Comments
 (0)