Un-special-case parsing base."etc"

This commit is contained in:
Nigel Tao committed 2020-06-10 11:34:56 +10:00
1 parent 4e2d0c1e5f
commit 74d291453d
5 files changed
+40 -31

No files matched your search

+4 -6
View File
@@ -487,12 +487,10 @@ func (g *gen) writeStatementRet(b *buffer, n *a.Ret, depth uint32) error {
couldBeSuspension := false
if retExpr.MType().IsStatus() && !n.RetsError() {
couldBeSuspension = true
if retExpr.Operator() == 0 {
if id := retExpr.Ident(); id == t.IDOk {
couldBeSuspension = false
} else if s := g.tm.ByID(id); (len(s) > 1) && (s[0] == '"') {
couldBeSuspension = s[1] == '$'
}
if s := g.tm.ByID(retExpr.Ident()); (len(s) > 1) && (s[0] == '"') {
couldBeSuspension = s[1] == '$'
} else if (retExpr.Operator() == 0) && (retExpr.Ident() == t.IDOk) {
couldBeSuspension = false
}
}