From 030d5f7c6bb671640e7e2d1986eb0a4aacbc932f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 24 Jun 2015 23:26:59 +0100 Subject: [PATCH] add labels, and inX properties to lookahead getState --- src/lookahead.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lookahead.js b/src/lookahead.js index 9faecdbf04..cd3a9c7d08 100644 --- a/src/lookahead.js +++ b/src/lookahead.js @@ -19,7 +19,11 @@ var STATE_KEYS = [ "exprAllowed", "potentialArrowAt", "currLine", - "input" + "input", + "inType", + "inFunction", + "inGenerator", + "labels" ]; pp.getState = function () { @@ -29,6 +33,7 @@ pp.getState = function () { state[key] = this[key] } state.context = this.context.slice() + state.labels = this.labels.slice() return state };