From 0396561520690168ddfd87b4b1a1f0562b08c624 Mon Sep 17 00:00:00 2001 From: Christian Gudrian Date: Thu, 6 Oct 2016 21:43:15 +0200 Subject: [PATCH] made visitAtom work for terminal nodes --- runtime/JavaScript/src/antlr4/tree/Tree.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runtime/JavaScript/src/antlr4/tree/Tree.js b/runtime/JavaScript/src/antlr4/tree/Tree.js index 4367b49b6..5b4d99009 100644 --- a/runtime/JavaScript/src/antlr4/tree/Tree.js +++ b/runtime/JavaScript/src/antlr4/tree/Tree.js @@ -107,10 +107,6 @@ ParseTreeVisitor.prototype.visitErrorNode = function(node) { var visitAtom = function(visitor, ctx) { - if (ctx.parser === undefined) { //is terminal - return; - } - var name = ctx.parser.ruleNames[ctx.ruleIndex]; var funcName = "visit" + Utils.titleCase(name); @@ -257,4 +253,4 @@ exports.TerminalNodeImpl = TerminalNodeImpl; exports.ParseTreeListener = ParseTreeListener; exports.ParseTreeVisitor = ParseTreeVisitor; exports.ParseTreeWalker = ParseTreeWalker; -exports.INVALID_INTERVAL = INVALID_INTERVAL; \ No newline at end of file +exports.INVALID_INTERVAL = INVALID_INTERVAL;