mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 08:47:28 +01:00
Rename warnings to notes
This commit is contained in:
1 parent
0319777cce
commit
0fa32bd09f
13 files changed
+82
-86
No files matched your search
@@ -435,15 +435,15 @@ func (g *gen) writeStatementRet(b *buffer, n *a.Ret, depth uint32) error {
|
||||
if g.currFunk.astFunc.Effect().Coroutine() ||
|
||||
(g.currFunk.returnsStatus && (len(g.currFunk.derivedVars) > 0)) {
|
||||
|
||||
isOK := false
|
||||
isComplete := false
|
||||
b.writes("status = ")
|
||||
if retExpr.Operator() == 0 && retExpr.Ident() == t.IDOk {
|
||||
b.writes("wuffs_base__make_status(NULL)")
|
||||
isOK = true
|
||||
isComplete = true
|
||||
} else {
|
||||
if retExpr.Ident().IsStrLiteral(g.tm) {
|
||||
msg, _ := t.Unescape(retExpr.Ident().Str(g.tm))
|
||||
isOK = statusMsgIsWarning(msg)
|
||||
isComplete = statusMsgIsNote(msg)
|
||||
}
|
||||
if err := g.writeExpr(
|
||||
b, retExpr, depth); err != nil {
|
||||
@@ -458,7 +458,7 @@ func (g *gen) writeStatementRet(b *buffer, n *a.Ret, depth uint32) error {
|
||||
|
||||
if n.RetsError() {
|
||||
b.writes("goto exit;")
|
||||
} else if isOK {
|
||||
} else if isComplete {
|
||||
g.currFunk.hasGotoOK = true
|
||||
b.writes("goto ok;")
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user