throw new AssertionError();
}
}
// Handle plugin functions.
SoyJsSrcFunction fn = soyJsSrcFunctionsMap.get(fnName);
if (fn != null) {
if (! fn.getValidArgsSizes().contains(numArgs)) {
throw SoySyntaxException.createWithoutMetaInfo(
"Function '" + fnName + "' called with the wrong number of arguments" +
" (function call \"" + node.toSourceString() + "\").");
}
List<JsExpr> args = visitChildren(node);
try {
return fn.computeForJsSrc(args);
} catch (Exception e) {
throw SoySyntaxException.createCausedWithoutMetaInfo(
"Error in function call \"" + node.toSourceString() + "\": " + e.getMessage(), e);
}
}