Prepare array and slice tokens

This commit is contained in:
Nigel Tao committed 2018-04-05 21:51:38 +10:00
1 parent 97aab37462
commit 2b91e7861c
12 files changed
+81 -68

No files matched your search

+2 -2
View File
@@ -389,9 +389,9 @@ func (p *parser) parseTypeExpr() (*a.TypeExpr, error) {
if p.peek1().Key() == t.KeyOpenBracket {
p.src = p.src[1:]
decorator, lhs := t.IDColon, (*a.Expr)(nil)
decorator, lhs := t.IDSlice, (*a.Expr)(nil)
if p.peek1().Key() != t.KeyCloseBracket {
decorator = t.IDOpenBracket
decorator = t.IDArray
var err error
lhs, err = p.parseExpr()
if err != nil {