@@ -47,7 +47,7 @@ export abstract class ASTWithName extends AST {
4747
4848export class EmptyExpr extends AST {
4949 override visit ( visitor : AstVisitor , context : any = null ) {
50- // do nothing
50+ return visitor . visitEmptyExpr ?. ( this , context ) ;
5151 }
5252}
5353
@@ -651,6 +651,7 @@ export interface AstVisitor {
651651 visitRegularExpressionLiteral ( ast : RegularExpressionLiteral , context : any ) : any ;
652652 visitSpreadElement ( ast : SpreadElement , context : any ) : any ;
653653 visitASTWithSource ?( ast : ASTWithSource , context : any ) : any ;
654+ visitEmptyExpr ?( ast : EmptyExpr , context : any ) : any ;
654655 /**
655656 * This function is optionally defined to allow classes that implement this
656657 * interface to selectively decide if the specified `ast` should be visited.
@@ -756,6 +757,7 @@ export class RecursiveAstVisitor implements AstVisitor {
756757 visitSpreadElement ( ast : SpreadElement , context : any ) {
757758 this . visit ( ast . expression , context ) ;
758759 }
760+ visitEmptyExpr ( ast : EmptyExpr , context : any ) : any { }
759761 // This is not part of the AstVisitor interface, just a helper method
760762 visitAll ( asts : AST [ ] , context : any ) : any {
761763 for ( const ast of asts ) {
0 commit comments