Remove ast.NewExpr statusPkg arg

This commit is contained in:
Nigel Tao committed 2020-06-10 12:05:48 +10:00
1 parent 7dc73a856a
commit ed48514f30
11 files changed
+39 -43

No files matched your search

+2 -2
View File
@@ -77,13 +77,13 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, depth uint32) error {
}
} else if ident.IsDQStrLiteral(g.tm) {
if z := g.statusMap[n.StatusQID()]; z.cName != "" {
if z := g.statusMap[t.QID{0, n.Ident()}]; z.cName != "" {
b.writes("wuffs_base__make_status(")
b.writes(z.cName)
b.writes(")")
return nil
}
return fmt.Errorf("unrecognized status %s", n.StatusQID().Str(g.tm))
return fmt.Errorf("unrecognized status %s", n.Str(g.tm))
} else if c, ok := g.scalarConstsMap[t.QID{0, n.Ident()}]; ok {
b.writes(c.Value().ConstValue().String())