mirror of
https://github.com/janet-lang/janet
synced 2025-01-10 15:40:30 +00:00
Optional param in bars.janet
This commit is contained in:
parent
ba4dd9b5bb
commit
ad5b0a371e
@ -47,7 +47,7 @@
|
||||
:error (error (parser/error p)))
|
||||
|
||||
# Make ast from forms
|
||||
(def ast ~(fn [params &] (default params @{}) (,buffer ,;forms)))
|
||||
(def ast ~(fn [&opt params] (default params @{}) (,buffer ,;forms)))
|
||||
|
||||
(def ctor (compile ast *env* source))
|
||||
(if-not (function? ctor)
|
||||
|
Loading…
Reference in New Issue
Block a user