mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Have cgen convert "ok" to "NULL"
This commit is contained in:
1 parent
fcffb9676e
commit
5a43e931f9
1 file changed
+1
-1
@@ -44,7 +44,7 @@ func (g *gen) writeExpr(b *buffer, n *a.Expr, rp replacementPolicy, depth uint32
|
||||
if cv := n.ConstValue(); cv != nil {
|
||||
if typ := n.MType(); typ.IsNumTypeOrIdeal() {
|
||||
b.writes(cv.String())
|
||||
} else if typ.IsNullptr() {
|
||||
} else if typ.IsNullptr() || typ.IsStatus() {
|
||||
b.writes("NULL")
|
||||
} else if cv.Cmp(zero) == 0 {
|
||||
b.writes("false")
|
||||
|
||||
Reference in new issue
Block a user