Use the |s| function instead of hardcoded |s0| value

Based on a patch by @fresheneesz:

  https://github.com/dmajda/pegjs/pull/148
redux
David Majda 12 years ago
parent 8759d4899e
commit 76cc5d55b4

@ -644,12 +644,12 @@ module.exports = function(ast, options) {
parts.push(indent2(code));
if (options.cache) {
parts.push(indent2(generateCacheFooter('s0')));
parts.push(indent2(generateCacheFooter(s(0))));
}
parts.push([
'',
' return s0;',
' return ' + s(0) + ';',
'}'
].join('\n'));

Loading…
Cancel
Save