Add single-quoted strings

This commit is contained in:
Nigel Tao committed 2020-03-25 19:41:02 +11:00
1 parent 3bfed6d812
commit 9e50918718
14 files changed
+273 -84

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, depth uint32) error {
b.writes("false")
}
} else if ident.IsStrLiteral(g.tm) {
} else if ident.IsDQStrLiteral(g.tm) {
if z := g.statusMap[n.StatusQID()]; z.cName != "" {
b.writes("wuffs_base__make_status(")
b.writes(z.cName)
+1 -1
View File
@@ -441,7 +441,7 @@ func (g *gen) writeStatementRet(b *buffer, n *a.Ret, depth uint32) error {
b.writes("wuffs_base__make_status(NULL)")
isComplete = true
} else {
if retExpr.Ident().IsStrLiteral(g.tm) {
if retExpr.Ident().IsDQStrLiteral(g.tm) {
msg, _ := t.Unescape(retExpr.Ident().Str(g.tm))
isComplete = statusMsgIsNote(msg)
}