/* Generated By:JJTree: Do not edit this line. ASTUserDefinedFunctionVariable.java Version 4.3 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=false,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.openntf.formula.ast;
import org.openntf.formula.FormulaContext;
import org.openntf.formula.FormulaReturnException;
import org.openntf.formula.ValueHolder;
import org.openntf.formula.parse.AtFormulaParserImpl;
public class ASTUserDefinedFunctionVariable extends SimpleNode {
String varName;
public ASTUserDefinedFunctionVariable(final AtFormulaParserImpl p, final int id) {
super(p, id);
}
@Override
public ValueHolder evaluate(final FormulaContext ctx) throws FormulaReturnException {
if (children == null)
return ValueHolder.valueDefault();
return children[0].evaluate(ctx);
}
public void init(final String image) {
varName = image.toLowerCase();
}
public String getNameLC() {
return varName;
}
}
/* JavaCC - OriginalChecksum=f89904010287e446226d4de58c599848 (do not edit this line) */