|
|
@ -62,7 +62,7 @@ function generateJS(ast, options) {
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'if (cached) {',
|
|
|
|
'if (cached) {',
|
|
|
|
' peg$currPos = cached.nextPos;',
|
|
|
|
' peg$currPos = cached.nextPos;',
|
|
|
|
'',
|
|
|
|
''
|
|
|
|
].join('\n'));
|
|
|
|
].join('\n'));
|
|
|
|
|
|
|
|
|
|
|
|
if (options.trace) {
|
|
|
|
if (options.trace) {
|
|
|
@ -208,7 +208,7 @@ function generateJS(ast, options) {
|
|
|
|
' return bc;',
|
|
|
|
' return bc;',
|
|
|
|
'}',
|
|
|
|
'}',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'function peg$parseRule(index) {',
|
|
|
|
'function peg$parseRule(index) {'
|
|
|
|
].join('\n'));
|
|
|
|
].join('\n'));
|
|
|
|
|
|
|
|
|
|
|
|
if (options.trace) {
|
|
|
|
if (options.trace) {
|
|
|
@ -220,7 +220,7 @@ function generateJS(ast, options) {
|
|
|
|
' ends = [],',
|
|
|
|
' ends = [],',
|
|
|
|
' stack = [],',
|
|
|
|
' stack = [],',
|
|
|
|
' startPos = peg$currPos,',
|
|
|
|
' startPos = peg$currPos,',
|
|
|
|
' params, i;',
|
|
|
|
' params, i;'
|
|
|
|
].join('\n'));
|
|
|
|
].join('\n'));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
parts.push([
|
|
|
|
parts.push([
|
|
|
@ -230,7 +230,7 @@ function generateJS(ast, options) {
|
|
|
|
' end = bc.length,',
|
|
|
|
' end = bc.length,',
|
|
|
|
' ends = [],',
|
|
|
|
' ends = [],',
|
|
|
|
' stack = [],',
|
|
|
|
' stack = [],',
|
|
|
|
' params, i;',
|
|
|
|
' params, i;'
|
|
|
|
].join('\n'));
|
|
|
|
].join('\n'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|