From c2c823196f34a60ec37833ec67ac6c784d430049 Mon Sep 17 00:00:00 2001 From: Futago-za Ryuu Date: Fri, 23 Mar 2018 04:12:19 +0000 Subject: [PATCH] Re-generate parser --- lib/parser.js | 20 -------------------- src/pegjs.config.js | 8 ++++++++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/lib/parser.js b/lib/parser.js index 451d022..7677c3f 100644 --- a/lib/parser.js +++ b/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 diff --git a/src/pegjs.config.js b/src/pegjs.config.js index d3750fd..ad69748 100644 --- a/src/pegjs.config.js +++ b/src/pegjs.config.js @@ -12,4 +12,12 @@ module.exports = { }, + features: { + + offset: false, + range: false, + expected: false, + + }, + };