use of kalang.antlr.KalangParser.BlockStmtContext in project kalang by kasonyang.
the class AstBuilder method requireBlock.
private BlockStmt requireBlock(ParserRuleContext stmt) {
if (stmt instanceof BlockStmtContext) {
return (BlockStmt) visit(stmt);
} else {
BlockStmt bs = newBlock();
bs.statements.add((Statement) visit(stmt));
popBlock();
return bs;
}
}
Aggregations