fix acorn hacky lookahead with token contexts - fixes #1349

This commit is contained in:
Sebastian McKenzie 2015-05-11 23:20:51 +01:00
parent 49077e2e03
commit fe739b97dd

View File

@ -14,7 +14,11 @@ var STATE_KEYS = [
"pos", "pos",
"end", "end",
"type", "type",
"value" "value",
"exprAllowed",
"potentialArrowAt",
"currLine",
"input"
]; ];
pp.getState = function () { pp.getState = function () {
@ -23,6 +27,7 @@ pp.getState = function () {
var key = STATE_KEYS[i] var key = STATE_KEYS[i]
state[key] = this[key] state[key] = this[key]
} }
state.context = this.context.slice()
return state return state
}; };