Merge pull request #1758 from brandonwillard/fix-decorator-error
Check arguments in with-decorator tag
This commit is contained in:
commit
cbca711865
@ -240,6 +240,8 @@ name (i.e. `sys.argv[0]`).
|
||||
|
||||
(deftag @ [expr]
|
||||
"with-decorator tag macro"
|
||||
(if (empty? expr)
|
||||
(macro-error expr "missing function argument"))
|
||||
(setv decorators (cut expr None -1)
|
||||
fndef (get expr -1))
|
||||
`(with-decorator ~@decorators ~fndef))
|
||||
|
Loading…
Reference in New Issue
Block a user