diff --git a/lib/compiler.js b/lib/compiler.js index 52d860d..1aab955 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -998,11 +998,7 @@ PEG.Compiler = { " return { line: line, column: column };", " }", " ", - " var initialContext = {", - " reportMatchFailures: true", - " };", - " ", - " var result = parse_${startRule}(initialContext);", + " var result = parse_${startRule}({ reportMatchFailures: true });", " ", " /*", " * The parser is now in one of the following three states:", diff --git a/lib/metagrammar.js b/lib/metagrammar.js index e81e0e6..57c586c 100644 --- a/lib/metagrammar.js +++ b/lib/metagrammar.js @@ -3392,11 +3392,7 @@ PEG.grammarParser = (function(){ return { line: line, column: column }; } - var initialContext = { - reportMatchFailures: true - }; - - var result = parse_grammar(initialContext); + var result = parse_grammar({ reportMatchFailures: true }); /* * The parser is now in one of the following three states: