1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

fix analyze.scm literal string warnings

* module/language/tree-il/analyze.scm (const-fmt): Return any literal
  value, not just strings.  The string case is checked later.
This commit is contained in:
Andy Wingo 2011-04-14 16:53:18 +02:00
parent 90779ad9a1
commit 3936cebc77

View file

@ -1347,10 +1347,9 @@ accurate information is missing from a given `tree-il' element."
(define (const-fmt x)
(record-case x
((<const> exp)
;; String literals.
(and (string? exp) exp))
exp)
((<application> proc args)
;; Gettexted string literals, like `(_ "foo")'.
;; Gettexted literals, like `(_ "foo")'.
(and (record-case proc
((<toplevel-ref> name) (eq? name '_))
((<module-ref> name) (eq? name '_))
@ -1358,8 +1357,7 @@ accurate information is missing from a given `tree-il' element."
(pmatch args
((,fmt)
(record-case fmt
((<const> exp)
(and (string? exp) exp))
((<const> exp) exp)
(else #f)))
(else #f))))
(else #f)))