Only visit is ctx.children is non-null

This commit is contained in:
Robert Brignull 2018-01-03 12:49:52 +00:00
parent 4cca8cd68d
commit dd3af945fd
1 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,9 @@ ParseTreeVisitor.prototype.visit = function(ctx) {
};
ParseTreeVisitor.prototype.visitChildren = function(ctx) {
return this.visit(ctx.children);
if (ctx.children) {
return this.visit(ctx.children);
}
}
ParseTreeVisitor.prototype.visitTerminal = function(node) {