Introduce and use SwitchBlock instead of StmtParent for switch-statement-or-expression

This commit is contained in:
Chris Smowton
2023-11-27 14:16:54 +00:00
parent e50a0eee59
commit 633b92da62
4 changed files with 18 additions and 11 deletions

View File

@@ -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.
*