mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +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 cv := n.ConstValue(); cv != nil {
|
||||||
if typ := n.MType(); typ.IsNumTypeOrIdeal() {
|
if typ := n.MType(); typ.IsNumTypeOrIdeal() {
|
||||||
b.writes(cv.String())
|
b.writes(cv.String())
|
||||||
} else if typ.IsNullptr() {
|
} else if typ.IsNullptr() || typ.IsStatus() {
|
||||||
b.writes("NULL")
|
b.writes("NULL")
|
||||||
} else if cv.Cmp(zero) == 0 {
|
} else if cv.Cmp(zero) == 0 {
|
||||||
b.writes("false")
|
b.writes("false")
|
||||||
|
|||||||
Reference in new issue
Block a user