def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
        method = Id(ctx.ID().getText())
        param = []
        if ctx.expression():
            for x in ctx.expression():
                param.append(x.accept(self))

        return CallStmt(method, param)
Пример #2
0
    def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
        method = Id(ctx.ID().getText())
        para: list
        if ctx.exp_list():
            para = self.visit(ctx.exp_list())
        else:
            para = []

        return CallStmt(method, para)
Пример #3
0
 def visitCall_stmt(self, ctx:BKITParser.Call_stmtContext):
     expr_list = []
     if ctx.expr():
         expr_list = list(map(lambda x: self.visitExpr(x), ctx.expr()))
     return CallStmt(Id(ctx.ID().getText()), expr_list)
Пример #4
0
 def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
     return CallStmt(Id(ctx.ID().getText()),ctx.expression_list().accept(self))
Пример #5
0
 def visitCall_exp(self, ctx: BKITParser.Call_stmtContext):
     method = Id(ctx.ID().getText())
     param = self.visit(ctx.exp_list()) if ctx.exp_list() else []
     return CallExpr(method, param)
Пример #6
0
 def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
     return CallStmt(Id(ctx.ID().getText()), self.visit(ctx.list_args()))
Пример #7
0
 def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
     param1 = []
     if ctx.call_list():
         param1 = ctx.call_list().accept(self)
     return CallStmt(Id(ctx.ID().getText()), param1)
Пример #8
0
 def visitCall_stmt(self, ctx: BKITParser.Call_stmtContext):
     if ctx.bet():
         return CallStmt(Id(ctx.ID().getText()), self.visit(ctx.bet()))
     else:
         return CallStmt(Id(ctx.ID().getText()), [])