@@ -64,6 +64,13 @@ class Stmt extends @stmt, ExprOrStmt, Documentable {
6464 }
6565}
6666
67+ private class TControlStmt =
68+ TLoopStmt or @ifstmt or @withstmt or @switchstmt or @trystmt or @catchclause;
69+
70+ private class TLoopStmt = TEnhancedForLoop or @whilestmt or @dowhilestmt or @forstmt;
71+
72+ private class TEnhancedForLoop = @forinstmt or @foreachstmt or @forofstmt;
73+
6774/**
6875 * A control statement, that is, is a loop, an if statement, a switch statement,
6976 * a with statement, a try statement, or a catch clause.
@@ -82,7 +89,7 @@ class Stmt extends @stmt, ExprOrStmt, Documentable {
8289 * }
8390 * ```
8491 */
85- abstract class ControlStmt extends Stmt {
92+ class ControlStmt extends TControlStmt , Stmt {
8693 /** Gets a statement controlled by this control statement. */
8794 abstract Stmt getAControlledStmt ( ) ;
8895}
@@ -102,7 +109,7 @@ abstract class ControlStmt extends Stmt {
102109 * } while(++i < lines.length);
103110 * ```
104111 */
105- abstract class LoopStmt extends ControlStmt {
112+ class LoopStmt extends TLoopStmt , ControlStmt {
106113 /** Gets the body of this loop. */
107114 abstract Stmt getBody ( ) ;
108115
@@ -801,7 +808,7 @@ class ForStmt extends @forstmt, LoopStmt {
801808 * }
802809 * ```
803810 */
804- abstract class EnhancedForLoop extends LoopStmt {
811+ class EnhancedForLoop extends TEnhancedForLoop , LoopStmt {
805812 /**
806813 * Gets the iterator of this `for`-`in` or `for`-`of` loop; this can be either a
807814 * pattern, a property reference, or a variable declaration statement.
0 commit comments