Refactor "semantic_and" emitter function a bit

redux
David Majda 13 years ago
parent 9111020ca2
commit 13ae52b2bf

@ -724,10 +724,10 @@ PEG.compiler.emitter = function(ast) {
semantic_and: function(node, context) { semantic_and: function(node, context) {
return formatCode( return formatCode(
'#{resultVar} = (function() {#{actionCode}})() ? "" : null;', '#{resultVar} = (function() {#{node.code}})() ? "" : null;',
{ {
actionCode: node.code, node: node,
resultVar: resultVar(context.resultIndex) resultVar: resultVar(context.resultIndex)
} }
); );
}, },

Loading…
Cancel
Save