From: Robert Griesemer Date: Tue, 15 Jul 2008 16:22:20 +0000 (-0700) Subject: - fixed issue with parsing function literals in statement lists X-Git-Tag: weekly.2009-11-06~3493 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d9d5f3b3bc07a079ab071f1909347c600e6f5335;p=gostls13.git - fixed issue with parsing function literals in statement lists SVN=127218 --- diff --git a/usr/gri/gosrc/parser.go b/usr/gri/gosrc/parser.go index beb74205f9..969816e696 100644 --- a/usr/gri/gosrc/parser.go +++ b/usr/gri/gosrc/parser.go @@ -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: