mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Allow scalar constants in type expressions
This commit is contained in:
1 parent
278200f560
commit
8bbdcc4ce1
7 files changed
+58
-18
No files matched your search
@@ -75,6 +75,9 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, depth uint32) error {
|
||||
return fmt.Errorf("unrecognized status %s", n.StatusQID().Str(g.tm))
|
||||
}
|
||||
|
||||
} else if c, ok := g.scalarConstsMap[t.QID{0, n.Ident()}]; ok {
|
||||
b.writes(c.Value().ConstValue().String())
|
||||
|
||||
} else {
|
||||
if n.GlobalIdent() {
|
||||
b.writes(g.pkgPrefix)
|
||||
|
||||
Reference in new issue
Block a user