use of org.beetl.core.parser.BeetlParser.Safe_allow_expContext in project beetl2.0 by javamonkey.
the class AntlrProgramBuilder method parseSafeOutput.
protected Expression parseSafeOutput(Safe_outputContext soctx) {
Expression safeExp = null;
List list = soctx.children;
if (list.size() == 1) {
safeExp = null;
} else {
// just xxx!exp
Safe_allow_expContext allowExp = (Safe_allow_expContext) list.get(1);
if (allowExp.literal() != null) {
safeExp = this.parseLiteralExpress(allowExp.literal());
} else if (allowExp.nativeCall() != null) {
safeExp = this.parseNativeCallExpression(allowExp.nativeCall());
} else if (allowExp.functionCall() != null) {
safeExp = this.parseFunExp(allowExp.functionCall());
} else if (allowExp.expression() != null) {
safeExp = this.parseExpress(allowExp.expression());
} else if (allowExp.varRef() != null) {
safeExp = this.parseVarRefExpression(allowExp.varRef());
}
}
return safeExp;
}
Aggregations