@@ -64,6 +64,13 @@ class Stmt extends @stmt, ExprOrStmt, Documentable {
64
64
}
65
65
}
66
66
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
+
67
74
/**
68
75
* A control statement, that is, is a loop, an if statement, a switch statement,
69
76
* a with statement, a try statement, or a catch clause.
@@ -82,7 +89,7 @@ class Stmt extends @stmt, ExprOrStmt, Documentable {
82
89
* }
83
90
* ```
84
91
*/
85
- abstract class ControlStmt extends Stmt {
92
+ class ControlStmt extends TControlStmt , Stmt {
86
93
/** Gets a statement controlled by this control statement. */
87
94
abstract Stmt getAControlledStmt ( ) ;
88
95
}
@@ -102,7 +109,7 @@ abstract class ControlStmt extends Stmt {
102
109
* } while(++i < lines.length);
103
110
* ```
104
111
*/
105
- abstract class LoopStmt extends ControlStmt {
112
+ class LoopStmt extends TLoopStmt , ControlStmt {
106
113
/** Gets the body of this loop. */
107
114
abstract Stmt getBody ( ) ;
108
115
@@ -801,7 +808,7 @@ class ForStmt extends @forstmt, LoopStmt {
801
808
* }
802
809
* ```
803
810
*/
804
- abstract class EnhancedForLoop extends LoopStmt {
811
+ class EnhancedForLoop extends TEnhancedForLoop , LoopStmt {
805
812
/**
806
813
* Gets the iterator of this `for`-`in` or `for`-`of` loop; this can be either a
807
814
* pattern, a property reference, or a variable declaration statement.
0 commit comments