mirror of
https://github.com/golang/go
synced 2024-11-22 13:24:53 -07:00
require ";" separator after function literals
R=rsc DELTA=1 (1 added, 0 deleted, 0 changed) OCL=27057 CL=27059
This commit is contained in:
parent
bfea141ca8
commit
27d1159ab4
@ -824,6 +824,7 @@ func (p *parser) parseFuncLit() ast.Expr {
|
|||||||
typ := p.parseFuncType();
|
typ := p.parseFuncType();
|
||||||
p.expr_lev++;
|
p.expr_lev++;
|
||||||
body := p.parseBlockStmt();
|
body := p.parseBlockStmt();
|
||||||
|
p.opt_semi = false; // function body requires separating ";"
|
||||||
p.expr_lev--;
|
p.expr_lev--;
|
||||||
|
|
||||||
return &ast.FuncLit{typ, body};
|
return &ast.FuncLit{typ, body};
|
||||||
|
Loading…
Reference in New Issue
Block a user