impc:ir:get-base-type   scheme


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

Implementation

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


Back to Index

Similar Entries