File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
rust/ql/src/queries/diagnostics Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
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
+ // gaps in the AST due to parse errors
24
+ p instanceof MissingPat and
25
+ msg = "Missing pattern."
26
+ }
You can’t perform that action at this time.
0 commit comments