mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
PS: Shorter predicate names for statement blocks.
This commit is contained in:
@@ -9,8 +9,7 @@ class ForEachStmt extends @foreach_statement, LoopStmt {
|
||||
|
||||
VarAccess getVariable() { foreach_statement(this, result, _, _, _) } // TODO: Change @ast to @variable_expression in dbscheme
|
||||
|
||||
/** ..., if any. */
|
||||
PipelineBase getCondition() { foreach_statement(this, _, result, _, _) } // TODO: Change @ast to @pipeline_base in dbscheme
|
||||
PipelineBase getIterableExpr() { foreach_statement(this, _, result, _, _) } // TODO: Change @ast to @pipeline_base in dbscheme
|
||||
|
||||
predicate isParallel() { foreach_statement(this, _, _, _, 1) }
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@ import powershell
|
||||
class StmtBlock extends @statement_block, Ast {
|
||||
override SourceLocation getLocation() { statement_block_location(this, result) }
|
||||
|
||||
int getNumStatements() { statement_block(this, result, _) }
|
||||
int getNumberOfStmts() { statement_block(this, result, _) }
|
||||
|
||||
int getNumTraps() { statement_block(this, _, result) }
|
||||
|
||||
Stmt getStatement(int index) { statement_block_statement(this, index, result) }
|
||||
Stmt getStmt(int index) { statement_block_statement(this, index, result) }
|
||||
|
||||
Stmt getAStatement() { result = this.getStatement(_) }
|
||||
Stmt getAStmt() { result = this.getStmt(_) }
|
||||
|
||||
TrapStmt getTrapStatement(int index) { statement_block_trap(this, index, result) }
|
||||
TrapStmt getTrapStmt(int index) { statement_block_trap(this, index, result) }
|
||||
|
||||
TrapStmt getATrapStatement() { result = this.getTrapStatement(_) }
|
||||
TrapStmt getATrapStmt() { result = this.getTrapStmt(_) }
|
||||
|
||||
override string toString() { result = "{...}" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user