Exemplo n.º 1
0
 def visitCompound_stmt(self, ctx: MPParser.Compound_stmtContext):
     result = []
     for check_compound in ctx.stmt():
         x = self.visit(check_compound)
         if isinstance(x, list):
             result += x
         else:
             result.append(str(x))
     return result
Exemplo n.º 2
0
 def visitCompound_stmt(self, ctx: MPParser.Compound_stmtContext):
     return self.visit(ctx.stmts_list()) if ctx.stmts_list() else []