From fe739b97dda8990064046f62b0ef52cb7bda5cd0 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 11 May 2015 23:20:51 +0100 Subject: [PATCH] fix acorn hacky lookahead with token contexts - fixes #1349 --- src/lookahead.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lookahead.js b/src/lookahead.js index 45854478e9..faedbd8d2a 100644 --- a/src/lookahead.js +++ b/src/lookahead.js @@ -14,7 +14,11 @@ var STATE_KEYS = [ "pos", "end", "type", - "value" + "value", + "exprAllowed", + "potentialArrowAt", + "currLine", + "input" ]; pp.getState = function () { @@ -23,6 +27,7 @@ pp.getState = function () { var key = STATE_KEYS[i] state[key] = this[key] } + state.context = this.context.slice() return state };