From 2fe1d8333f318b47e5a48af56e68e82b1b1034b0 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 11 Jan 2017 15:38:55 +0000 Subject: [PATCH 1/2] sign contributors.txt --- contributors.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.txt b/contributors.txt index f97f51737..94430f38b 100644 --- a/contributors.txt +++ b/contributors.txt @@ -129,3 +129,4 @@ YYYY/MM/DD, github id, Full name, email 2016/12/11, Gaulouis, Gaulouis, gaulouis.com@gmail.com 2016/12/22, akosthekiss, Akos Kiss, akiss@inf.u-szeged.hu 2016/12/24, adrpo, Adrian Pop, adrian.pop@liu.se +2017/01/11, robertbrignull, Robert Brignull, robertbrignull@gmail.com From a053d908fb9559fd607f1d3223275ef2443ec4e8 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 11 Jan 2017 15:28:59 +0000 Subject: [PATCH 2/2] fix missing variable declarations --- runtime/JavaScript/src/antlr4/Utils.js | 2 +- runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js | 2 +- runtime/JavaScript/src/antlr4/dfa/DFA.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/JavaScript/src/antlr4/Utils.js b/runtime/JavaScript/src/antlr4/Utils.js index a49ed69f4..d6cd153e9 100644 --- a/runtime/JavaScript/src/antlr4/Utils.js +++ b/runtime/JavaScript/src/antlr4/Utils.js @@ -361,7 +361,7 @@ Hash.prototype.update = function () { k = (k << 15) | (k >>> (32 - 15)); k = k * 0x1B873593; this.count = this.count + 1; - hash = this.hash ^ k; + var hash = this.hash ^ k; hash = (hash << 13) | (hash >>> (32 - 13)); hash = hash * 5 + 0xE6546B64; this.hash = hash; diff --git a/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js b/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js index c7b28a3fc..0c2f1486a 100644 --- a/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js +++ b/runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js @@ -1444,7 +1444,7 @@ ParserATNSimulator.prototype.precedenceTransition = function(config, pt, collec c = new ATNConfig({state:pt.target}, config); // no pred context } } else { - newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate()); + var newSemCtx = SemanticContext.andContext(config.semanticContext, pt.getPredicate()); c = new ATNConfig({state:pt.target, semanticContext:newSemCtx}, config); } } else { diff --git a/runtime/JavaScript/src/antlr4/dfa/DFA.js b/runtime/JavaScript/src/antlr4/dfa/DFA.js index 9b8390fec..152dd7a66 100644 --- a/runtime/JavaScript/src/antlr4/dfa/DFA.js +++ b/runtime/JavaScript/src/antlr4/dfa/DFA.js @@ -32,7 +32,7 @@ function DFA(atnStartState, decision) { { if (atnStartState.isPrecedenceDecision) { this.precedenceDfa = true; - precedenceState = new DFAState(null, new ATNConfigSet()); + var precedenceState = new DFAState(null, new ATNConfigSet()); precedenceState.edges = []; precedenceState.isAcceptState = false; precedenceState.requiresFullContext = false;