Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7be2ae commit 2894653Copy full SHA for 2894653
1 file changed
rust/ql/src/queries/diagnostics/MissingElements.ql
@@ -0,0 +1,26 @@
1
+/**
2
+ * @name Missing Elements
3
+ * @description List all elements that weren't extracted due to unimplemented features or parse errors.
4
+ * @kind diagnostic
5
+ * @id rust/diagnostics/missing-elements
6
+ */
7
+
8
+import rust
9
10
+query predicate listUnimplemented(AstNode n, string msg) {
11
+ // not extracted yet
12
+ n instanceof Unimplemented and
13
+ msg = "Not yet implemented."
14
+}
15
16
+query predicate listMissingExpr(Expr e, string msg) {
17
+ // gaps in the AST due to parse errors
18
+ e instanceof MissingExpr and
19
+ msg = "Missing expression."
20
21
22
+query predicate listMissingPat(Pat p, string msg) {
23
24
+ p instanceof MissingPat and
25
+ msg = "Missing pattern."
26
0 commit comments