tur/expander
src/scscm/expander.tur
defn
scscm-cstr-eq?
(scscm-cstr-eq? [a :cstr b :cstr])
defn
ast-kind
(ast-kind [node :int])
defn
ast-symbol-name
(ast-symbol-name [node :int])
defn
ast-list-len
(ast-list-len [node :int])
defn
ast-list-get
(ast-list-get [node :int i :int])
defn
scscm-ast-leaf
(scscm-ast-leaf [kind :int value :cstr])
defn
scscm-ast-list-node
(scscm-ast-list-node [kind :int])
defn
scscm-ast-add-child
(scscm-ast-add-child [node :int child :int])
defn
scscm-macro-env-get
(scscm-macro-env-get)
defn
scscm-macro-env-set
(scscm-macro-env-set [env :int])
defn
scscm-macro-env-update
(scscm-macro-env-update [env :int])
defn
scscm-macro-env-op
(scscm-macro-env-op [op :int val :int])
defn
scscm-macro-get
(scscm-macro-get)
defn
scscm-macro-set
(scscm-macro-set [env :int])
defn
scscm-macro-define
(scscm-macro-define [name :int params :int body :int])
defn
scscm-cstr-eq-node?
(scscm-cstr-eq-node? [name :cstr node :int])
defn
scscm-macro-lookup-loop
(scscm-macro-lookup-loop [name :cstr env :int])
defn
scscm-macro-lookup
(scscm-macro-lookup [name :cstr])
defn
scscm-make-sym
(scscm-make-sym [name :cstr])
defn
scscm-make-list-from-cons
(scscm-make-list-from-cons [children :int])
defn
scscm-fill-list-from-cons
(scscm-fill-list-from-cons [node :int children :int])
defn
scscm-make-wrap
(scscm-make-wrap [sym-name :cstr inner :int])
defn
scscm-make-call2
(scscm-make-call2 [sym-name :cstr a :int b :int])
defn
scscm-copy-children
(scscm-copy-children [dst :int src :int start :int])
defn
scscm-children-cons
(scscm-children-cons [src :int start :int])
defn
scscm-children-cons-loop
(scscm-children-cons-loop [src :int i :int acc :int])
defn
scscm-void
(scscm-void)
defn
scscm-expand-qq
(scscm-expand-qq [node :int depth :int])
defn
scscm-qq-fill-list
(scscm-qq-fill-list [dst :int src :int i :int depth :int])
defn
scscm-splice-children
(scscm-splice-children [dst :int src-node :int])
defn
scscm-thread-first-step
(scscm-thread-first-step [acc :int form :int])
defn
scscm-thread-last-step
(scscm-thread-last-step [acc :int form :int])
defn
scscm-expand-thread-first
(scscm-expand-thread-first [node :int i :int acc :int])
defn
scscm-expand-thread-last
(scscm-expand-thread-last [node :int i :int acc :int])
defn
scscm-macro-apply
(scscm-macro-apply [params-node :int body :int args :int])
defn
scscm-kind-int
(scscm-kind-int [knd :cstr])
defn
scscm-subst
(scscm-subst [node :int params :int args :int])
defn
scscm-subst-fill
(scscm-subst-fill [dst :int src :int params :int args :int i :int])
defn
scscm-find-param
(scscm-find-param [sym-node :int params :int args :int])
defn
scscm-find-param-loop
(scscm-find-param-loop [sym-node :int params :int args :int i :int])
defn
scscm-cons-nth
(scscm-cons-nth [lst :int n :int])
defn
scscm-expand-when
(scscm-expand-when [node :int])
defn
scscm-expand-unless
(scscm-expand-unless [node :int])
defn
scscm-copy-expanded-children
(scscm-copy-expanded-children [dst :int src :int start :int])
defn
scscm-expand-children
(scscm-expand-children [node :int])
defn
scscm-expand-pbind
(scscm-expand-pbind [node :int])
defn
scscm-expand-pattern-fn
(scscm-expand-pattern-fn [sclang-name :cstr node :int])
defn
scscm-expand-defsynth
(scscm-expand-defsynth [node :int])
defn
scscm-expand-definst
(scscm-expand-definst [node :int])
defn
scscm-expand-comp
(scscm-expand-comp [node :int])
defn
scscm-expand-partial
(scscm-expand-partial [node :int])
defn
scscm-expand-adsr
(scscm-expand-adsr [node :int])
defn
scscm-expand-perc
(scscm-expand-perc [node :int])
defn
scscm-expand-env-line
(scscm-expand-env-line [node :int])
defn
scscm-expand-midi-hz
(scscm-expand-midi-hz [node :int])
defn
scscm-expand-hz-midi
(scscm-expand-hz-midi [node :int])
defn
scscm-expand-db-amp
(scscm-expand-db-amp [node :int])
defn
scscm-expand-amp-db
(scscm-expand-amp-db [node :int])
defn
scscm-expand-ctl
(scscm-expand-ctl [node :int])
defn
scscm-expand-kill
(scscm-expand-kill [node :int])
defn
scscm-expand-doseq
(scscm-expand-doseq [node :int])
defn
scscm-expand-dotimes
(scscm-expand-dotimes [node :int])
defn
scscm-expand-collect
(scscm-expand-collect [node :int])
defn
scscm-handle-defmacro
(scscm-handle-defmacro [node :int])
defn
expand
(expand [ast :int])
expand macros in a single AST node.
Parameters
| ast | AST node handle (from parser) |
Returns
Expanded AST node handle (may be a new allocation).
Example
(expand (parse-one-form my-tokens))
Since: SC3
defn
scscm-expand-list
(scscm-expand-list [node :int])
defn
scscm-expand-let
(scscm-expand-let [node :int])
defn
scscm-expand-let-bindings
(scscm-expand-let-bindings [dst :int bvec :int i :int])
defn
scscm-expand-cond
(scscm-expand-cond [node :int])
defn
scscm-expand-cond-pairs
(scscm-expand-cond-pairs [node :int i :int])
defn
expand-all
(expand-all [asts :int])
expand macros in a cons list of top-level AST nodes.
Parameters
| asts | cons list of AST node handles |
Returns
Cons list of expanded AST node handles.
Example
(expand-all top-level-nodes)
Since: SC3