def __makeAbs(self, f, c): assert (isinstance(f, list)) if isinstance(c, pi.Blk): body = c else: body = pi.Blk(c) if f == []: return pi.Abs(pi.Formals(), body) else: formals = [e for e in f if e != ','] return pi.Abs(formals, body)
def __makeAbs(self, f, c): assert (isinstance(f, list)) if isinstance(c, pi.Blk): body = c else: body = pi.Blk(c) if f == []: return pi.Abs(pi.Formals(), body) else: # Tatsu roduces list of identifiers and commas from # formals = ','%{ identifiers } formals = [e for e in f if e != ','] return pi.Abs(formals, body)
def __makeAbs(self, f, c): if isinstance(c, pi.Blk): body = c else: body = pi.Blk(c) if f == []: return pi.Abs(pi.Formals(), body) else: formals = [] for k, v in f.items(): if not v == None: formals.append(v) return pi.Abs(formals, body)