Browse Source

Re-generate parser

master
Futago-za Ryuu 4 years ago
parent
commit
c2c823196f
  1. 20
      lib/parser.js
  2. 8
      src/pegjs.config.js

20
lib/parser.js

@ -381,30 +381,10 @@ function peg$parse(input, options) {
return input.substring(peg$savedPos, peg$currPos);
}
function offset() {
return peg$savedPos;
}
function range() {
return [peg$savedPos, peg$currPos];
}
function location() {
return peg$computeLocation(peg$savedPos, peg$currPos);
}
function expected(description, location) {
location = location !== undefined
? location
: peg$computeLocation(peg$savedPos, peg$currPos);
throw peg$buildStructuredError(
[peg$otherExpectation(description)],
input.substring(peg$savedPos, peg$currPos),
location
);
}
function error(message, location) {
location = location !== undefined
? location

8
src/pegjs.config.js

@ -12,4 +12,12 @@ module.exports = {
},
features: {
offset: false,
range: false,
expected: false,
},
};
Loading…
Cancel
Save