use of org.beetl.core.parser.BeetlParser.AssignMentContext in project beetl2.0 by javamonkey.
the class AntlrProgramBuilder method parseVarDeclareList.
private VarAssignStatementSeq parseVarDeclareList(VarDeclareListContext ctx) {
List<AssignMentContext> list = ctx.assignMent();
List<ASTNode> listNode = new ArrayList<ASTNode>();
for (AssignMentContext amc : list) {
VarAssignStatement vas = this.parseAssign(amc);
listNode.add(vas);
if (!(vas instanceof VarRefAssignStatement)) {
// 如果是临时变量定义
this.registerNewVar(vas);
}
}
VarAssignStatementSeq seq = new VarAssignStatementSeq(listNode.toArray(new Statement[0]), null);
return seq;
}
Aggregations