Exemple #1
0
    def visitExp7(self, ctx: BKITParser.ProgramContext):
        if (ctx.getChildCount() == 1):
            return ctx.exp8().accept(self)

        exps_list = ctx.exps_list().accept(self)
        return CallExpr(Id(ctx.ID().getText()), exps_list)
Exemple #2
0
 def visitCall_stmt(self, ctx: BKITParser.ProgramContext):
     exps_list = ctx.exps_list().accept(self)
     return CallStmt(Id(ctx.ID().getText()), exps_list)