Sha256: e6eb8e56474b12c8039a0a12886df1c0590cee7f03dbe863a26f4b7e8a140915
Contents?: true
Size: 747 Bytes
Versions: 3
Compression:
Stored size: 747 Bytes
Contents
"use strict"; var _state = require("./state"); var pp = _state.Parser.prototype; var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "curLine", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input"]; pp.getState = function () { var state = {}; for (var i = 0; i < STATE_KEYS.length; i++) { var key = STATE_KEYS[i]; state[key] = this[key]; } state.context = this.context.slice(); return state; }; pp.lookahead = function () { var old = this.getState(); this.isLookahead = true; this.next(); this.isLookahead = false; var curr = this.getState(); for (var key in old) this[key] = old[key]; return curr; };
Version data entries
3 entries across 3 versions & 1 rubygems