There was an error while loading. Please reload this page.
1 parent 0c196de commit 33cd8d2Copy full SHA for 33cd8d2
2 files changed
unified/ql/lib/codeql/unified/internal/FacadeAst.qll
@@ -0,0 +1,20 @@
1
+/**
2
+ * Provides facade AST classes, with additional hand-written members on top of the generated ones.
3
+ */
4
+overlay[local?]
5
+module;
6
+
7
+module Unified {
8
+ private import Ast::Unified as G
9
+ import G
10
11
+ class AstNode extends G::AstNode {
12
+ /** Holds if this AST node has a modifier with the given text. */
13
+ predicate hasModifier(string text) {
14
+ exists(Modifier mod |
15
+ mod.getParent() = this and
16
+ mod.getValue() = text
17
+ )
18
+ }
19
20
+}
unified/ql/lib/unified.qll
@@ -4,6 +4,6 @@
import codeql.Locations
import codeql.files.FileSystem
-import codeql.unified.Ast::Unified
+import codeql.unified.internal.FacadeAst::Unified
import codeql.unified.internal.AstExtra::Public
import codeql.unified.internal.Variables::Public
0 commit comments