def visitCompound_statement(self,ctx:MPParser.Compound_statementContext):
        lststmt = []
        for x in ctx.statement():
            lststmt += self.visit(x)

        return lststmt
예제 #2
0
 def visitCompound_statement(self, ctx: MPParser.Compound_statementContext):
     if ctx.statement():
         return [j for i in ctx.statement() for j in self.visit(i)]
     else:
         return []
예제 #3
0
 def visitCompound_statement(self,ctx:MPParser.Compound_statementContext):
     return [self.visit(x) for x in ctx.statement()]
 def visitCompound_statement(self, ctx: MPParser.Compound_statementContext):
     return reduce(lambda x, y: x + y if type(y) == list else x + [y],
                   [self.visit(t) for t in ctx.statement()], [])