ReturnInstruction result = new ReturnInstruction(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function");
@Override TemplateElement[] accept(Environment env) throws TemplateException { if (exp != null) { env.setLastReturnValue(exp.eval(env)); } if (nextSibling() == null && getParentElement() instanceof Macro) { // Avoid unnecessary exception throwing return null; } throw Return.INSTANCE; }
@Override protected String dump(boolean canonical) { StringBuilder sb = new StringBuilder(); if (canonical) sb.append('<'); sb.append(getNodeTypeSymbol()); if (exp != null) { sb.append(' '); sb.append(exp.getCanonicalForm()); } if (canonical) sb.append("/>"); return sb.toString(); }
void accept(Environment env) throws TemplateException { if (exp != null) { env.setLastReturnValue(exp.getAsTemplateModel(env)); } if (nextSibling() != null) { // We need to jump out using an exception. throw Return.INSTANCE; } if (!(getParent() instanceof Macro || getParent().getParent() instanceof Macro)) { // Here also, we need to jump out using an exception. throw Return.INSTANCE; } }
public String getDescription() { return "return" + " [" + getStartLocation() + "]"; }
ReturnInstruction result = new ReturnInstruction(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function");
@Override TemplateElement[] accept(Environment env) throws TemplateException { if (exp != null) { env.setLastReturnValue(exp.eval(env)); } if (nextSibling() == null && getParentElement() instanceof Macro) { // Avoid unnecessary exception throwing return null; } throw Return.INSTANCE; }
@Override protected String dump(boolean canonical) { StringBuilder sb = new StringBuilder(); if (canonical) sb.append('<'); sb.append(getNodeTypeSymbol()); if (exp != null) { sb.append(' '); sb.append(exp.getCanonicalForm()); } if (canonical) sb.append("/>"); return sb.toString(); }
ReturnInstruction result = new ReturnInstruction(exp); result.setLocation(template, start, end); {if ("" != null) return result;} throw new Error("Missing return statement in function");
@Override TemplateElement[] accept(Environment env) throws TemplateException { if (exp != null) { env.setLastReturnValue(exp.eval(env)); } if (nextSibling() == null && getParentElement() instanceof Macro) { // Avoid unnecessary exception throwing return null; } throw Return.INSTANCE; }
@Override protected String dump(boolean canonical) { StringBuilder sb = new StringBuilder(); if (canonical) sb.append('<'); sb.append(getNodeTypeSymbol()); if (exp != null) { sb.append(' '); sb.append(exp.getCanonicalForm()); } if (canonical) sb.append("/>"); return sb.toString(); }
ReturnInstruction result = new ReturnInstruction(exp); result.setLocation(template, start, end); {if (true) return result;} throw new Error("Missing return statement in function");