Rename x T to x: T for fields and func args

This commit is contained in:
Nigel Tao committed 2019-10-12 21:49:04 +11:00
1 parent 5b4e3647c0
commit 1520a1f345
15 files changed
+226 -216

No files matched your search

+5
View File
@@ -364,6 +364,11 @@ func (p *parser) parseFieldNode1(flags a.Flags) (*a.Node, error) {
if err != nil {
return nil, err
}
if x := p.peek1(); x != t.IDColon {
got := p.tm.ByID(x)
return nil, fmt.Errorf(`parse: expected ":", got %q at %s:%d`, got, p.filename, p.line())
}
p.src = p.src[1:]
typ, err := p.parseTypeExpr()
if err != nil {
return nil, err