Java: Add common base class for SwitchStmt and SwitchExpr
Đang mở
Java
question
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
**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?).
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.