def arg_decl_identifier(state, p): if len(p) == 4: return ast.VarDeclPartial(p[1].getstr(), p[2], None, p[3], srcpos=sr(p)) else: return ast.VarDeclPartial(p[1].getstr(), p[4], p[3], p[5], srcpos=sr(p))
def arg_decl_empty(state, p): return ast.VarDeclPartial(None, None, None, None, srcpos=(0, 0))
def var_decl_identifier(state, p): return ast.VarDeclPartial([p[1].getstr()] + p[2].get_names())
def var_decl_identifier(state, p): return ast.VarDeclPartial(p[1].getstr(), p[2], p[3], srcpos=sr(p))
def var_decl_empty(state, p): return ast.VarDeclPartial([])