|
|
|
@ -743,12 +743,12 @@ PEG.Compiler = {
|
|
|
|
|
return PEG.Compiler.formatCode(
|
|
|
|
|
"${expressionCode}",
|
|
|
|
|
"var ${resultVar} = ${expressionResultVar} !== null",
|
|
|
|
|
" ? (function(${formalParams}) {${action}})(${actualParams})",
|
|
|
|
|
" ? (function(${formalParams}) {${actionCode}})(${actualParams})",
|
|
|
|
|
" : null;",
|
|
|
|
|
{
|
|
|
|
|
expressionCode: PEG.Compiler.compileNode(node.expression, expressionResultVar),
|
|
|
|
|
expressionResultVar: expressionResultVar,
|
|
|
|
|
action: node.action,
|
|
|
|
|
actionCode: node.code,
|
|
|
|
|
formalParams: formalParams.join(", "),
|
|
|
|
|
actualParams: actualParams.join(", "),
|
|
|
|
|
resultVar: resultVar
|
|
|
|
|