public Expression gen(
      CallNode callNode,
      TemplateAliases templateAliases,
      TranslationContext translationContext,
      ErrorReporter errorReporter,
      TranslateExprNodeVisitor exprTranslator) {

    // Build the JS CodeChunk for the callee's name.
    Expression callee = genCallee(callNode, templateAliases, exprTranslator);

    // Generate the data object to pass to callee
    Expression objToPass =
        genObjToPass(callNode, templateAliases, translationContext, errorReporter, exprTranslator);

    Expression call = genMainCall(callee, objToPass, callNode);
    if (callNode.getEscapingDirectives().isEmpty()) {
      return call;
    }
    return applyEscapingDirectives(call, callNode);
  }
public Expression gen ( CallNode callNode , TemplateAliases templateAliases , TranslationContext translationContext , ErrorReporter errorReporter , TranslateExprNodeVisitor exprTranslator ) { Expression callee = genCallee ( callNode , templateAliases , exprTranslator ) ; Expression objToPass = genObjToPass ( callNode , templateAliases , translationContext , errorReporter , exprTranslator ) ; Expression call = genMainCall ( callee , objToPass , callNode ) ; if ( callNode . getEscapingDirectives ( ) . isEmpty ( ) ) { return call ; } return applyEscapingDirectives ( call , callNode ) ; }
Generates the JS expression for a given call.

<p>Important: If there are CallParamContentNode children whose contents are not computable as
JS expressions, then this function assumes that, elsewhere, code has been generated to define
their respective 'param&lt;n&gt;' temporary variables.

<p>Here are five example calls:

<pre>
{call some.func data="all" /}
{call some.func data="$boo.foo" /}
{call some.func}
{param goo = $moo /}
{/call}
{call some.func data="$boo"}
{param goo}Blah{/param}
{/call}
{call some.func}
{param goo}
{for $i in range(3)}{$i}{/for}
{/param}
{/call}
</pre>

Their respective generated calls might be the following:

<pre>
some.func(opt_data)
some.func(opt_data.boo.foo)
some.func({goo: opt_data.moo})
some.func(soy.$$assignDefaults({goo: 'Blah'}, opt_data.boo))
some.func({goo: param65})
</pre>

Note that in the last case, the param content is not computable as JS expressions, so we assume
that code has been generated to define the temporary variable 'param&lt;n&gt;'.

@param callNode The call to generate code for.
@param templateAliases A mapping of fully qualified calls to a variable in scope.
@return The JS expression for the call.