hara.common.emit-helper

+default+

+sym-replace+

basic-typed-args

added in 4.0

(basic-typed-args args)

typed args without grammar checks

(mapv (juxt meta identity) (basic-typed-args ’(:int i, :const :int j))) => ’[[{:- :int} i] [{:- :const :int} j]]

default-emit-fn

added in 4.0

(default-emit-fn form grammar mopts)

the default emit function

emit-symbol-full

added in 4.0

(emit-symbol-full sym ns grammar)

emits a full symbol

emit-type-record

added in 4.0

(emit-type-record {:keys [modifiers symbol]})

formats to standard

emit-typed-allowed-args

added in 4.0

(emit-typed-allowed-args [all curr] grammar)

allowed declared args other than symbols

emit-typed-args

added in 3.0

(emit-typed-args args grammar)(emit-typed-args args grammar {:keys [shorthand]})

create types args from declarationns

form-key-base

added in 4.0

(form-key-base form)

gets the key for a form

(form-key-base :a) => :keyword :token true

(form-key-base ()) => :expression

get-option

added in 3.0

(get-option grammar path option)

gets either the path option or the default one

get-options

added in 3.0

(get-options grammar path)

gets the path option merged with defaults

pr-single

added in 3.0

(pr-single s)

prints a single quoted string

rest-arg-form?

added in 4.1

(rest-arg-form? form)

checks for the canonical xtalk rest argument form (:.. args)

rest-arg-symbol

added in 4.1

(rest-arg-symbol form)

returns the symbol bound by a canonical xtalk rest argument form