mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Java: Clarify the meaning of getRuleExpression/Statement
This commit is contained in:
@@ -438,11 +438,17 @@ class SwitchCase extends Stmt, @case {
|
||||
|
||||
/**
|
||||
* Gets the expression on the right-hand side of the arrow, if any.
|
||||
*
|
||||
* Note this is mutually exclusive with `getRuleStatement`: it gets a value
|
||||
* when this case is of the form `case e1 -> e2`, where `e2` is not a block.
|
||||
*/
|
||||
Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 }
|
||||
|
||||
/**
|
||||
* Gets the statement on the right-hand side of the arrow, if any.
|
||||
*
|
||||
* Note this is mutually exclusive with `getRuleExpression`: it gets a value
|
||||
* when this case if of the form `case e1 -> { s1; s2; ... }`.
|
||||
*/
|
||||
Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user