def arglist_non_empty(state, p): if len(p) == 5: vars = ([ast.Var(p[1].getstr(), p[2], None, p[1].getsrcpos())] + p[3].get_vars()) else: vars = ([ast.Var(p[1].getstr(), p[4], p[3], p[1].getsrcpos())] + p[5].get_vars()) return ast.ArgList(vars, srcpos=sr(p))
def arglist_non_empty(state, p): vars = [ast.Var(p[1].getstr(), p[2], p[1].getsrcpos()) ] + p[3].get_vars() return ast.ArgList(vars, srcpos=sr(p))
def arglist(state, p): return ast.ArgList([], srcpos=sr(p))
def arglist(state, p): return ast.ArgList([])