impc:ir:get-base-type-g   scheme


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

Implementation

;; GCHANGE
;; removes %b when returning base types (i.e. !head%b returns !head)
(define impc:ir:get-base-type-g
  (lambda (str)
    (let* ((r1 (car (regex:split str "##")))
           (r2 (impc:ir:get-ptr-depth r1))
           (r3 (string-append "^([^%]*)%*[a-z]*" (apply string-append (make-list r2 "\\*")) "$")))
      ;; (println str r2 "$1")
      (regex:replace r1 r3 "$1"))))


Back to Index