]> Cypherpunks repositories - gostls13.git/commit
text/template: refactor set parsing
authorRob Pike <r@golang.org>
Fri, 18 Nov 2011 06:53:23 +0000 (22:53 -0800)
committerRob Pike <r@golang.org>
Fri, 18 Nov 2011 06:53:23 +0000 (22:53 -0800)
commit25d2987dd93e1fa0d325af440a69e26fc0c9ee0e
tree252211315a2860306a321050424c3c763f110ac5
parentbbf952c3b4c5d7beb15c5c2a0ffb20f02323e6ea
text/template: refactor set parsing
Parse {{define}} blocks during template parsing rather than separately as a set-specific thing.
This cleans up set parse significantly, and enables the next step, if we want, to unify the
API for templates and sets.
Other than an argument change to parse.Parse, which is in effect an internal function and
unused by client code, there is no API change and no spec change yet.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5393049
src/pkg/text/template/exec_test.go
src/pkg/text/template/parse.go
src/pkg/text/template/parse/parse.go
src/pkg/text/template/parse/parse_test.go
src/pkg/text/template/parse/set.go
src/pkg/text/template/set.go