Get rid of the |_startRule| property in generated parsers.
This commit is contained in:
parent
95735f2c97
commit
1daf1448e5
|
@ -884,8 +884,6 @@ PEG.Compiler = {
|
|||
" /* Generated by PEG.js (http://pegjs.majda.cz/). */",
|
||||
" ",
|
||||
" var result = {",
|
||||
" _startRule: ${startRule|string},",
|
||||
" ",
|
||||
/* This needs to be in sync with PEG.StringUtils.quote. */
|
||||
" _quoteString: function(s) {",
|
||||
" /*",
|
||||
|
@ -1016,7 +1014,7 @@ PEG.Compiler = {
|
|||
" reportMatchFailures: true",
|
||||
" };",
|
||||
" ",
|
||||
" var result = this['_parse_' + this._startRule](initialContext);",
|
||||
" var result = this._parse_${startRule}(initialContext);",
|
||||
" ",
|
||||
" /*",
|
||||
" * The parser is now in one of the following three states:",
|
||||
|
|
|
@ -2,8 +2,6 @@ PEG.grammarParser = (function(){
|
|||
/* Generated by PEG.js (http://pegjs.majda.cz/). */
|
||||
|
||||
var result = {
|
||||
_startRule: "grammar",
|
||||
|
||||
_quoteString: function(s) {
|
||||
/*
|
||||
* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string
|
||||
|
@ -3515,7 +3513,7 @@ PEG.grammarParser = (function(){
|
|||
reportMatchFailures: true
|
||||
};
|
||||
|
||||
var result = this['_parse_' + this._startRule](initialContext);
|
||||
var result = this._parse_grammar(initialContext);
|
||||
|
||||
/*
|
||||
* The parser is now in one of the following three states:
|
||||
|
|
Loading…
Reference in a new issue