Commit 27d1159a authored by Robert Griesemer's avatar Robert Griesemer

require ";" separator after function literals

R=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=27057
CL=27059
parent bfea141c
......@@ -824,6 +824,7 @@ func (p *parser) parseFuncLit() ast.Expr {
typ := p.parseFuncType();
p.expr_lev++;
body := p.parseBlockStmt();
p.opt_semi = false; // function body requires separating ";"
p.expr_lev--;
return &ast.FuncLit{typ, body};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment