Exemplo n.º 1
0
 def visitStmt(self, ctx:BKITParser.StmtContext):
     return (
         ctx.assignStmt() or
         ctx.ifStmt() or
         ctx.forStmt() or
         ctx.whileStmt() or
         ctx.doWhileStmt() or
         ctx.breakStmt() or
         ctx.continueStmt() or
         ctx.callStmt() or
         ctx.returnStmt()
     ).accept(self)
Exemplo n.º 2
0
 def visitStmt(self,ctx:BKITParser.StmtContext):
     if ctx.stmt_notfunc():
         return self.visitStmt_notfunc(ctx.stmt_notfunc())
     else:
         return self.visitStmt_spe(ctx.stmt_spe())
Exemplo n.º 3
0
 def visitStmt(self, ctx:BKITParser.StmtContext):
     if ctx.assignment_stmt():
         return ctx.assignment_stmt().accept(self)
     if ctx.if_stmt():
         return ctx.if_stmt().accept(self)
     if ctx.for_stmt():
         return ctx.for_stmt().accept(self)
     if ctx.while_stmt():
         return ctx.while_stmt().accept(self)
     if ctx.doWhile_stmt():
         return ctx.doWhile_stmt().accept(self)
     if ctx.break_stmt():
         return ctx.break_stmt().accept(self)
     if ctx.continue_stmt():
         return ctx.continue_stmt().accept(self)
     if ctx.call_stmt():
         return ctx.call_stmt().accept(self)
     if ctx.return_stmt():
         return ctx.return_stmt().accept(self)
Exemplo n.º 4
0
 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 []
Exemplo n.º 5
0
 def visitStmt(self, ctx: BKITParser.StmtContext):
     return self.visit(ctx.getChild(0))