impc:ir:get-type-from-pretty-vector   scheme


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

Implementation

(define impc:ir:get-type-from-pretty-vector
  (lambda (string-type . args)
    (let* ((s1 (regex:replace string-type "/(.+)/?.*" "$1"))
           (t1 (cl:remove-if (lambda (x) (string=? x ""))
                             (regex:match-all s1 impc:ir:regex-tc-or-a)))
           (num? (if (regex:match? (car t1) "[a-zA-Z]") ;; (car t1) should be numbers only!
                     (impc:compiler:print-bad-type-error string-type "first element must be a number")))
           (t2 (list (string->number (car t1))
                     (apply impc:ir:get-type-from-pretty-str (cadr t1) args))))
      t2)))


Back to Index