// if the macro argument (astNode) is a reference, we need to evaluate it
// in case it is a multilevel node
if (type == ParserTreeConstants.JJTREFERENCE)
{
ASTReference ref = (ASTReference) astNode;
if (ref.jjtGetNumChildren() > 0)
{
return ref.execute(null, wrappedContext);
}
else
{
Object obj = wrappedContext.get(ref.getRootString());
if (obj == null && ref.strictRef)
{
if (!wrappedContext.containsKey(ref.getRootString()))
{
throw new MethodInvocationException("Parameter '" + ref.getRootString()
+ "' not defined", null, key, ref.getTemplateName(),
ref.getLine(), ref.getColumn());
}
}
return obj;
}
}