variable-constructor   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pattern.xtm

Implementation

;; is this a "match variable" 
(define variable-constructor
  (lambda (em)
    (cond ((symbol? em)
            (let ((res (regex:matched (symbol->string em) "^([^?]*)(\\?+)(.*)$")))
              (if (null? res)
                  (list em "" "????" "literal")
                  res)))
          (else (list em "" "????" "literal"))))) ;; 4 * ???? for literal  (was #f)


Back to Index