add labels, and inX properties to lookahead getState

This commit is contained in:
Sebastian McKenzie 2015-06-24 23:26:59 +01:00
parent 9e0cc028ed
commit 030d5f7c6b

View File

@ -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
};