Ejemplo n.º 1
0
 def visitParamList(self, ctx: MPParser.ParamListContext):
     if not ctx.listOfType(): return []
     else:
         listVarDec = []
         for listoftype in ctx.listOfType():
             listID, types = self.visit(listoftype)
             for id in listID:
                 listVarDec += [VarDecl(id, types)]
         return listVarDec
Ejemplo n.º 2
0
 def visitParamList(self, ctx:MPParser.ParamListContext):
     listOfVarDecl = []
     listOfType = ctx.listOfType()
     if not listOfType:
         return []
     else:
         for x in listOfType:
             listid, types = self.visit(x)
             for id in listid:
                 listOfVarDecl.append(VarDecl(Id(id),types))
         return listOfVarDecl
Ejemplo n.º 3
0
 def visitParamList(self, ctx: MPParser.ParamListContext):
     return [
         param for paramdecl in ctx.param()
         for param in self.visit(paramdecl)
     ]