core: move fn to the syntax tier
fn -> fn* is a one-line head-swap (the analyzer treats fn* as the primitive). It's in 00-syntax since the analyzer, kernel, and other overlay macro bodies all use fn. First of the fundamental macros to move. conformance 228x3, fixpoint, clojure-test-suite 3930.
This commit is contained in:
parent
023fe637ce
commit
85cdb97320
2 changed files with 5 additions and 10 deletions
|
|
@ -60,6 +60,10 @@
|
|||
;; pending cells (matching the prior Janet macro).
|
||||
(defmacro declare [& syms] `(do))
|
||||
|
||||
;; fn -> fn*: the analyzer treats fn* as the primitive (it handles params, &-rest,
|
||||
;; multi-arity); fn is just the public spelling.
|
||||
(defmacro fn [& args] `(fn* ~@args))
|
||||
|
||||
;; A fresh jolt symbol inside a macro body (a bare (gensym) returns a Janet symbol
|
||||
;; the destructurer rejects). This defn compiles fine: by the time a tier triggers
|
||||
;; the analyzer build the kernel is in place (the build is gated until then).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue