Java: Add common base class for SwitchStmt and SwitchExpr
未关闭
Java
question
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
**Description of the issue**
Would it be possible to add a common base class for SwitchStmt and SwitchExpr?
Currently both classes define common predicates and it is often useful to find out whether a switch covers certain values, regardless of whether it is a statement or an expression.
Common predicates:
- `getACase`
- `getAConstCase`
- `getAStmt`
- `getDefaultCase`
- `getExpr`
- `getStmt`
Some built-in QL types and queries would likely profit from this as well (though classes like `ConstSwitchStmt` would have to be redesigned to extend from this new class?).
贡献指南
评估
这个 Issue 还没有评估数据。