mescc: prefix string labels with _.

* module/mes/M1.mes (object->M1): Prefix string lables with _.
This commit is contained in:
Jan Nieuwenhuizen 2017-12-02 14:04:41 +01:00
parent 60b7048e21
commit 3636818b1a
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@
(strings (filter (lambda (g) (and (pair? g) (eq? (car g) #:string))) global-names)))
(define (string->label o)
(let ((index (list-index (lambda (s) (equal? s o)) strings)))
(format #f "string_~a_~a" file-name index)))
(format #f "_string_~a_~a" file-name index)))
(define (text->M1 o)
(pmatch o
;; FIXME
@ -135,7 +135,7 @@
(let* ((label o)
(function? (member label function-names))
(string-label (string->label label))
(string? (not (equal? string-label "string_#f")))
(string? (not (equal? string-label "_string_#f")))
(global? (member label global-names)))
(if (or global? string?) (format #f "&~a" label)
(begin (if (not function?) (stderr "warning: unresolved label: ~s\n" label))