Add Forbble comment

This commit is contained in:
Sage Vaillancourt 2020-11-08 16:44:53 -05:00
parent fc3fcf34ed
commit cc199b0e57
1 changed files with 10 additions and 8 deletions

View File

@ -111,14 +111,16 @@
(if (= "over" _x) (_over 0)
(if (= "^" _x) (pch (bop 0))
(if (= ":" _x) ( ; Compile a phrase into the next symbol
(def var (at 1 list))
(defe var (+ "_" var))
(defe (+ "_" var) ())
(def list (compile (rest (rest list)) (+ "_" var))))
( ; If none of the above hit, try to interpret as a compiled symbol
(def _e (eval _x))
(if (iserr (len _e)) () (feval _e))
)
(def var (at 1 list)) ; Collect the symbol to define, as a string
(defe var (+ "_" var)) ; Add an underscore for the internal storage
(defe (+ "_" var) ()) ; Define internally as an empty list
(def list (compile ; Overwrite list with output of (compile)
(rest (rest list)) ; Current list, not including ':' or the symbol
(+ "_" var)))) ; The internal variable name
( ; If none of the above hit, try to interpret as a compiled symbol
(def _e (eval _x))
(if (iserr (len _e)) () (feval _e))
)
))))))))))))
; A switch/case operator might be good, to avoid huge closing-paren chains