mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Introduce and use SwitchBlock instead of StmtParent for switch-statement-or-expression
This commit is contained in:
@@ -428,6 +428,13 @@ class SwitchStmt extends Stmt, @switchstmt {
|
||||
override string getAPrimaryQlClass() { result = "SwitchStmt" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `switch` statement or expression.
|
||||
*/
|
||||
class SwitchBlock extends StmtParent {
|
||||
SwitchBlock() { this instanceof SwitchStmt or this instanceof SwitchExpr }
|
||||
}
|
||||
|
||||
/**
|
||||
* A case of a `switch` statement or expression.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user