Add a "status" type and "try" keyword.

This commit is contained in:
Nigel Tao committed 2017-09-01 16:41:42 +10:00
1 parent 363dcbe714
commit 935cd73686
11 files changed
+94 -24

No files matched your search

+5 -1
View File
@@ -31,6 +31,10 @@ func (n *Expr) appendString(buf []byte, tm *t.Map, parenthesize bool, depth uint
case 0:
buf = append(buf, tm.ByID(n.id1)...)
case t.KeyTry:
buf = append(buf, "try "...)
fallthrough
case t.KeyOpenParen:
buf = n.lhs.Expr().appendString(buf, tm, true, depth)
if n.flags&FlagsSuspendible != 0 {
@@ -77,7 +81,7 @@ func (n *Expr) appendString(buf []byte, tm *t.Map, parenthesize bool, depth uint
buf = append(buf, ')')
case t.KeyLimit:
// TODO.
buf = append(buf, "TODO(limit)"...)
}
case t.FlagsUnaryOp: