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
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
def visitParamList(self, ctx: MPParser.ParamListContext): return [ param for paramdecl in ctx.param() for param in self.visit(paramdecl) ]