@@ -15,11 +15,11 @@ import java
1515
1616/**
1717 * A control structure for which the trailing body (the syntactically last part)
18- * is not a `Block `. This is either an `IfStmt` or a `LoopStmt`, but not a
18+ * is not a `BlockStmt `. This is either an `IfStmt` or a `LoopStmt`, but not a
1919 * `DoStmt`, since do-while statements don't have a trailing body.
2020 */
2121predicate unbracedTrailingBody ( Stmt ctrlStructure , Stmt trailingBody ) {
22- not trailingBody instanceof Block and
22+ not trailingBody instanceof BlockStmt and
2323 (
2424 exists ( IfStmt c | c = ctrlStructure |
2525 trailingBody = c .getElse ( ) and not trailingBody instanceof IfStmt
@@ -33,15 +33,15 @@ predicate unbracedTrailingBody(Stmt ctrlStructure, Stmt trailingBody) {
3333
3434/*
3535 * The body of a `SwitchStmt` is a block, but it isn't represented explicitly
36- * in the AST as a `Block `, so we have to take it into account directly in the
36+ * in the AST as a `BlockStmt `, so we have to take it into account directly in the
3737 * following two predicates.
3838 */
3939
4040/**
41- * Two consecutive statements in a `Block ` statement or `SwitchStmt`.
41+ * Two consecutive statements in a `BlockStmt ` statement or `SwitchStmt`.
4242 */
4343Stmt nextInBlock ( Stmt s ) {
44- exists ( Block b , int i |
44+ exists ( BlockStmt b , int i |
4545 b .getStmt ( i ) = s and
4646 b .getStmt ( i + 1 ) = result
4747 )
@@ -52,10 +52,10 @@ Stmt nextInBlock(Stmt s) {
5252 )
5353}
5454
55- /** The `Stmt.getParent()` relation restricted to not pass through `Block `s or `SwitchStmt`s. */
55+ /** The `Stmt.getParent()` relation restricted to not pass through `BlockStmt `s or `SwitchStmt`s. */
5656Stmt nonBlockParent ( Stmt s ) {
5757 result = s .getParent ( ) and
58- not result instanceof Block and
58+ not result instanceof BlockStmt and
5959 not result instanceof SwitchStmt
6060}
6161
@@ -64,7 +64,7 @@ predicate ifElseIf(IfStmt s, IfStmt elseif) { s.getElse() = elseif }
6464
6565/**
6666 * The statement `body` is an unbraced trailing body of a control structure and
67- * `succ` is the next statement in the surrounding `Block ` (or `SwitchStmt`).
67+ * `succ` is the next statement in the surrounding `BlockStmt ` (or `SwitchStmt`).
6868 */
6969predicate shouldOutdent (
7070 Stmt ctrl , Stmt body , Stmt succ , int bodycol , int succcol , int bodyline , int succline
@@ -79,7 +79,7 @@ predicate shouldOutdent(
7979
8080/**
8181 * The statement `body` is an unbraced trailing body of a control structure and
82- * `succ` is the next statement in the surrounding `Block ` (or `SwitchStmt`).
82+ * `succ` is the next statement in the surrounding `BlockStmt ` (or `SwitchStmt`).
8383 * The indentation of statement `succ` is suspect because it is indented
8484 * the same way as `body` and thus visually suggests to be part of the same
8585 * syntactic scope as `body`.
0 commit comments