def visitStmt(self, ctx: BKITParser.StmtContext): if ctx.assign_stmt(): return ctx.assign_stmt().accept(self) elif ctx.if_stmt(): return ctx.if_stmt().accept(self) elif ctx.for_stmt(): return ctx.for_stmt().accept(self) elif ctx.while_stmt(): return ctx.while_stmt().accept(self) elif ctx.dowhile_stmt(): return ctx.dowhile_stmt().accept(self) elif ctx.call_stmt(): return ctx.call_stmt().accept(self) elif ctx.return_stmt(): return ctx.return_stmt().accept(self) elif ctx.continue_stmt(): return ctx.continue_stmt().accept(self) elif ctx.break_stmt(): return ctx.break_stmt().accept(self)
def visitStmt(self, ctx:BKITParser.StmtContext): if ctx.if_stmt(): return self.visitIf_stmt(ctx.if_stmt()) if ctx.for_stmt(): return self.visitFor_stmt(ctx.for_stmt()) if ctx.while_stmt(): return self.visitWhile_stmt(ctx.while_stmt()) if ctx.dowhile_stmt(): return self.visitDowhile_stmt(ctx.dowhile_stmt()) if ctx.assign_stmt(): return self.visitAssign_stmt(ctx.assign_stmt()) if ctx.break_stmt(): return self.visitBreak_stmt(ctx.break_stmt()) if ctx.continue_stmt(): return self.visitContinue_stmt(ctx.continue_stmt()) if ctx.call_stmt(): return self.visitCall_stmt(ctx.call_stmt()) if ctx.return_stmt(): return self.visitReturn_stmt(ctx.return_stmt()) return []