- fixed issue with parsing function literals in statement lists

SVN=127218
This commit is contained in:
Robert Griesemer 2008-07-15 09:22:20 -07:00
parent cbdaa10f8c
commit d9d5f3b3bc

View File

@ -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: