|
|
|
@ -634,7 +634,7 @@ function generateJavaScript(ast, options) {
|
|
|
|
|
|
|
|
|
|
if (options.cache) {
|
|
|
|
|
parts.push(indent2(
|
|
|
|
|
generateCacheHeader(asts.indexOfRuleByName(ast, rule.name))
|
|
|
|
|
generateCacheHeader(asts.indexOfRule(ast, rule.name))
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -696,10 +696,10 @@ function generateJavaScript(ast, options) {
|
|
|
|
|
startRuleIndices = '{ '
|
|
|
|
|
+ arrays.map(
|
|
|
|
|
options.allowedStartRules,
|
|
|
|
|
function(r) { return r + ': ' + asts.indexOfRuleByName(ast, r); }
|
|
|
|
|
function(r) { return r + ': ' + asts.indexOfRule(ast, r); }
|
|
|
|
|
).join(', ')
|
|
|
|
|
+ ' }';
|
|
|
|
|
startRuleIndex = asts.indexOfRuleByName(ast, options.allowedStartRules[0]);
|
|
|
|
|
startRuleIndex = asts.indexOfRule(ast, options.allowedStartRules[0]);
|
|
|
|
|
|
|
|
|
|
parts.push([
|
|
|
|
|
' peg$startRuleIndices = ' + startRuleIndices + ',',
|
|
|
|
|