applied to symbols. Process everything as strings, and then
convert to a symbol at the end.
2004-12-16 Jim Blandy <jimb@redhat.com>
+ * utils-cgen.scm (parse-name): Don't assume that string-map can be
+ applied to symbols. Process everything as strings, and then
+ convert to a symbol at the end.
+
* read.scm (debug-repl): Temporarily redirect input and output to
/dev/tty while we debug, so we don't interfere with whatever CGEN
is reading or writing.
; FIXME: Isn't the plan to move ERRTXT to the 1st arg?
(define (parse-name name errtxt)
- (cond ((list? name)
- (string->symbol (string-map (lambda (elm) (parse-name elm errtxt)) name)))
- ((symbol? name) name)
- ((string? name) (string->symbol name))
- (else (parse-error errtxt "improper name" name)))
+ (string->symbol
+ (let parse ((name name))
+ (cond
+ ((list? name) (string-map parse name))
+ ((symbol? name) (symbol->string name))
+ ((string? name) name)
+ (else (parse-error errtxt "improper name" name)))))
)
; Parse an object comment.