Rushed fix for the contrib.meth macros

This commit is contained in:
Paul Tagliamonte 2013-05-12 13:40:30 -04:00
parent 5a82585a7f
commit 8717d40e19

View File

@ -28,7 +28,7 @@ from hy.macros import macro
def router(tree, rkwargs=None):
tree.pop(0)
tree = HyExpression(tree)
name = tree.pop(0)
path = tree.pop(0)
tree.insert(0, HySymbol("fn"))
@ -44,15 +44,15 @@ def router(tree, rkwargs=None):
@macro("route")
def route_macro(tree):
def route_macro(*tree):
return router(tree)
@macro("post_route")
def post_route_macro(tree):
def post_route_macro(*tree):
return router(tree, rkwargs=HyList([HyString("POST")]))
@macro("get_route")
def get_route_macro(tree):
def get_route_macro(*tree):
return router(tree, rkwargs=HyList([HyString("GET")]))