mirror of
https://github.com/golang/go.git
synced 2024-09-23 19:39:24 +00:00
- fixed issue with parsing function literals in statement lists
SVN=127218
This commit is contained in:
parent
cbdaa10f8c
commit
d9d5f3b3bc
@ -826,9 +826,11 @@ func (P *Parser) TryStatement() bool {
|
||||
switch P.tok {
|
||||
case Scanner.CONST: fallthrough;
|
||||
case Scanner.TYPE: fallthrough;
|
||||
case Scanner.VAR: fallthrough;
|
||||
case Scanner.FUNC:
|
||||
case Scanner.VAR:
|
||||
P.ParseDeclaration();
|
||||
case Scanner.FUNC:
|
||||
// for now we do not allow local function declarations
|
||||
fallthrough;
|
||||
case Scanner.GTR:
|
||||
P.ParseSimpleStat(); // send
|
||||
case Scanner.IDENT:
|
||||
|
Loading…
Reference in New Issue
Block a user