use of org.beetl.core.statement.WhileStatement in project beetl2.0 by javamonkey.
the class AntlrProgramBuilder method parseWhile.
protected WhileStatement parseWhile(WhileStContext wc) {
pbCtx.enterBlock();
// break,continue语句到此为止
pbCtx.current.canStopContinueBreakFlag = true;
ExpressionContext condtionCtx = wc.parExpression().expression();
StatementContext bodyCtx = wc.statement();
Expression condtion = this.parseExpress(condtionCtx);
Statement body = this.parseStatment(bodyCtx);
WhileStatement whileStat = new WhileStatement(condtion, body, this.getBTToken(wc.getStart()));
pbCtx.exitBlock();
return whileStat;
}
Aggregations