]> Cypherpunks repositories - gostls13.git/commit
exp/templates: variable scope persists until "end".
authorRob Pike <r@golang.org>
Sun, 17 Jul 2011 03:31:59 +0000 (13:31 +1000)
committerRob Pike <r@golang.org>
Sun, 17 Jul 2011 03:31:59 +0000 (13:31 +1000)
commitc705701c69a0ae18ec690cd6a34481f52c52f65b
tree6c98e7366166df2d9603c3a97f3372fd855413ae
parent331840f50935cb886254ee6b5bc6daad7788979b
exp/templates: variable scope persists until "end".
The previous CL doicumented and diagnosed the old situation.
This one changes it to something more traditional: any action
may declare a variable, and the block structure of scopes
applies only to control seequences.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4748047
src/pkg/exp/template/doc.go
src/pkg/exp/template/exec.go
src/pkg/exp/template/exec_test.go
src/pkg/exp/template/parse.go
src/pkg/exp/template/parse_test.go
src/pkg/exp/template/set_test.go