-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStmts.qll
More file actions
73 lines (62 loc) · 2 KB
/
Stmts.qll
File metadata and controls
73 lines (62 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Statement nodes in the AST.
*/
private import AstNodes
private import internal.AstNodes
private import internal.TreeSitter
private import internal.Stmts
private import internal.AssertStatement
private import internal.ForStatement
private import internal.IfStatement
private import internal.ImportStatement
private import internal.ImportWithStatement
private import internal.Infrastructure
private import internal.Statement
private import internal.UsingStatement
// CFG
private import codeql.bicep.CFG
private import codeql.bicep.controlflow.internal.ControlFlowGraphImpl as CfgImpl
/**
* A Stmt block
*/
class Stmts extends AstNode instanceof StmtsImpl {
/** Gets a control-flow node for this statement, if any. */
CfgImpl::AstCfgNode getAControlFlowNode() { result.getAstNode() = this }
/** Gets a control-flow entry node for this statement, if any */
AstNode getAControlFlowEntryNode() { result = CfgImpl::getAControlFlowEntryNode(this) }
}
/**
* A AssertStatement statement
*/
final class AssertStatementStmt extends Stmts instanceof AssertStatementImpl { }
/**
* A ForStatement statement
*/
final class ForStatementStmt extends Stmts instanceof ForStatementImpl { }
/**
* A IfStatement statement
*/
final class IfStatementStmt extends Stmts instanceof IfStatementImpl { }
/**
* A ImportStatement statement
*/
final class ImportStatementStmt extends Stmts instanceof ImportStatementImpl { }
/**
* A Infrastructure unknown AST node.
*/
class Infrastructure extends AstNode instanceof InfrastructureImpl {
/** Gets the first statement in the infrastructure. */
Stmts getStatement(int index) { result = InfrastructureImpl.super.getStatement(index) }
}
/**
* A ImportWithStatement statement
*/
final class ImportWithStatementStmt extends Stmts instanceof ImportWithStatementImpl { }
/**
* A Statement statement
*/
final class StatementStmt extends Stmts instanceof StatementImpl { }
/**
* A UsingStatement statement
*/
final class UsingStatementStmt extends Stmts instanceof UsingStatementImpl { }