mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Format
This commit is contained in:
@@ -440,10 +440,10 @@ class SwitchCase extends Stmt, @case {
|
||||
* Gets the expression on the right-hand side of the arrow, if any.
|
||||
*
|
||||
* Note, this predicate gets a value when this switch case is of the form
|
||||
* `case e1 -> e2`, where `e2` is neither a block nor a throw statement.
|
||||
* `case e1 -> e2`, where `e2` is neither a block nor a throw statement.
|
||||
* This predicate is mutually exclusive with `getRuleStatement`.
|
||||
*/
|
||||
Expr getRuleExpression() {
|
||||
Expr getRuleExpression() {
|
||||
result.getParent() = this and result.getIndex() = -1
|
||||
or
|
||||
exists(ExprStmt es | es.getParent() = this and es.getIndex() = -1 | result = es.getExpr())
|
||||
@@ -453,10 +453,10 @@ class SwitchCase extends Stmt, @case {
|
||||
* Gets the statement on the right-hand side of the arrow, if any.
|
||||
*
|
||||
* Note, this predicate gets a value when this switch case is of the form
|
||||
* `case e1 -> { s1; s2; ... }` or `case e1 -> throw ...`.
|
||||
* `case e1 -> { s1; s2; ... }` or `case e1 -> throw ...`.
|
||||
* This predicate is mutually exclusive with `getRuleExpression`.
|
||||
*/
|
||||
Stmt getRuleStatement() {
|
||||
Stmt getRuleStatement() {
|
||||
result.getParent() = this and result.getIndex() = -1 and not result instanceof ExprStmt
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user