xtmdoc-globalvar-handler   scheme


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

Implementation

(define xtmdoc-globalvar-handler
  (lambda (name-sym)
    (list
     '(category . "global var")
     (cons 'name (symbol->string name-sym))
     (list 'args)
     ;; rememeber that global vars need to be "depointerised" by one level
     (cons 'type (impc:ir:pretty-print-type (impc:ir:pointer-- (impc:ti:get-globalvar-type (symbol->string name-sym)))))
     (cons 'docstring
           (let ((docstring (impc:ti:get-globalvar-docstring (symbol->string name-sym))))
             (if (string=? docstring "") '() docstring))))))


Back to Index