1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +00:00

Remove code delimtiers from defn and defmacro.

This commit is contained in:
Calvin Rose 2021-05-29 20:37:30 -05:00
parent c911f7c47e
commit 84f82f5465

View File

@ -33,12 +33,12 @@
# Add function signature to docstring
(var index 0)
(def arglen (length args))
(def buf (buffer "`(" name))
(def buf (buffer "(" name))
(while (< index arglen)
(buffer/push-string buf " ")
(buffer/format buf "%j" (in args index))
(set index (+ index 1)))
(array/push modifiers (string buf ")`\n\n" docstr))
(array/push modifiers (string buf ")\n\n" docstr))
# Build return value
~(def ,name ,;modifiers (fn ,name ,;(tuple/slice more start)))))