impc:ti:genericfunc-apply-macros   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmti.xtm

Implementation

(define impc:ti:genericfunc-apply-macros
  (lambda (ast)
    (cond ((atom? ast) ast)
          ((and (list? ast)
                (symbol? (car ast))
                (impc:ti:xtmacro-exists? (symbol->string (car ast))))
           (macro-expand (cons (string->symbol
                                (string-append "xtmacro_"
                                               (symbol->string (car ast))))
                               (cdr ast))))
          ((pair? ast)
           (cons (impc:ti:genericfunc-apply-macros (car ast))
                 (impc:ti:genericfunc-apply-macros (cdr ast))))
          (else ast))))


Back to Index