Skip to content

Commit 53af309

Browse files
committed
not sure why we started hitting the assert for these node types now...
1 parent a061958 commit 53af309

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/node-visitor.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export class TreeVisitor {
8282
case b.IfStatement: rv = this.visitIf(n, ...args); break;
8383
case b.ImportDeclaration: rv = this.visitImportDeclaration(n, ...args); break;
8484
case b.ImportSpecifier: rv = this.visitImportSpecifier(n, ...args); break;
85+
case b.ImportDefaultSpecifier: rv = this.visitImportDefaultSpecifier(n, ...args); break;
86+
case b.ImportNamespaceSpecifier: rv = this.visitImportNamespaceSpecifier(n, ...args); break;
8587
case b.LabeledStatement: rv = this.visitLabeledStatement(n, ...args); break;
8688
case b.Literal: rv = this.visitLiteral(n, ...args); break;
8789
case b.LogicalExpression: rv = this.visitLogicalExpression(n, ...args); break;
@@ -426,6 +428,16 @@ export class TreeVisitor {
426428
return n;
427429
}
428430

431+
visitImportDefaultSpecifier (n, ...args) {
432+
n.local = this.visit(n.local, ...args);
433+
return n;
434+
}
435+
436+
visitImportNamespaceSpecifier (n, ...args) {
437+
n.local = this.visit(n.local, ...args);
438+
return n;
439+
}
440+
429441
visitArrayPattern (n, ...args) {
430442
n.elements = this.visitArrayKeep(n.elements, ...args);
431443
return n;

0 commit comments

Comments
 (0)