]> Cypherpunks repositories - gostls13.git/commit
go/ast, parser: condition in if statement is mandatory
authorRobert Griesemer <gri@golang.org>
Wed, 23 Feb 2011 01:25:10 +0000 (17:25 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 23 Feb 2011 01:25:10 +0000 (17:25 -0800)
commit23c16cf216488430ae60dfdbf89ecf7fe8d6f9b6
treec503d3a37691dd493241c72f4afa66f5fdc22192
parenta1368a6ad0f413c57b2487806c7058146b21678b
go/ast, parser: condition in if statement is mandatory

As a result, parsing a "control clause" is now sufficiently
different for if, switch, and for statements that the code
is not factored out anymore. The code is a bit longer but
clearer in each individual case.

Reflect the changes in AST.

R=r, r2
CC=golang-dev
https://golang.org/cl/4173075
src/pkg/go/ast/ast.go
src/pkg/go/ast/walk.go
src/pkg/go/parser/parser.go
src/pkg/go/parser/parser_test.go