@@ -146,24 +146,8 @@ class Exec extends Exec_ {
146
146
/**
147
147
* An exception handler such as an `except` or an `except*` statement
148
148
* in a `try` statement.
149
- *
150
- * We do not wish to expose an abstract class that users are not
151
- * meant to extend, so this class is kept private. The user facing
152
- * class is `ExceptionHandler`.
153
149
*/
154
- abstract private class ExceptionHandlerImpl extends Stmt {
155
- /** Gets the name of this except group block. */
156
- abstract Expr getName ( ) ;
157
-
158
- /** Gets the type of this except group block. */
159
- abstract Expr getType ( ) ;
160
- }
161
-
162
- /**
163
- * An exception handler such as an `except` or an `except*` statement
164
- * in a `try` statement.
165
- */
166
- class ExceptionHandler extends Stmt instanceof ExceptionHandlerImpl {
150
+ class ExceptionHandler extends Stmt {
167
151
ExceptionHandler ( ) {
168
152
this instanceof ExceptStmt_
169
153
or
@@ -174,14 +158,14 @@ class ExceptionHandler extends Stmt instanceof ExceptionHandlerImpl {
174
158
Try getTry ( ) { result .getAHandler ( ) = this }
175
159
176
160
/** Gets the name of this except group block. */
177
- Expr getName ( ) { result = super . getName ( ) }
161
+ abstract Expr getName ( ) ;
178
162
179
163
/** Gets the type of this except group block. */
180
- Expr getType ( ) { result = super . getType ( ) }
164
+ abstract Expr getType ( ) ;
181
165
}
182
166
183
167
/** An except group statement (part of a `try` statement), such as `except* IOError as err:` */
184
- class ExceptGroupStmt extends ExceptGroupStmt_ , ExceptionHandlerImpl {
168
+ class ExceptGroupStmt extends ExceptGroupStmt_ , ExceptionHandler {
185
169
/* syntax: except Expr [ as Expr ]: */
186
170
override Expr getASubExpression ( ) {
187
171
result = this .getName ( )
@@ -203,7 +187,7 @@ class ExceptGroupStmt extends ExceptGroupStmt_, ExceptionHandlerImpl {
203
187
}
204
188
205
189
/** An except statement (part of a `try` statement), such as `except IOError as err:` */
206
- class ExceptStmt extends ExceptStmt_ , ExceptionHandlerImpl {
190
+ class ExceptStmt extends ExceptStmt_ , ExceptionHandler {
207
191
/* syntax: except Expr [ as Expr ]: */
208
192
override Expr getASubExpression ( ) {
209
193
result = this .getName ( )
0 commit comments