]> Cypherpunks repositories - gostls13.git/commit
text/template: add break, continue actions in ranges
authorTim Cooper <tim.cooper@layeh.com>
Wed, 27 Sep 2017 00:14:03 +0000 (21:14 -0300)
committerRob Pike <r@golang.org>
Tue, 17 Oct 2017 02:06:15 +0000 (02:06 +0000)
commit3be5d551801a97a76e236a2a53489b1c9c22e665
tree99281e70b044f736eef5def74773045673392747
parent0b2cb89196967030ae005076f0166ad7d6024083
text/template: add break, continue actions in ranges

Adds the two range control actions "break" and "continue". They act the
same as the Go keywords break and continue, but are simplified in that
only the innermost range statement can be broken out of or continued.

Fixes #20531

Change-Id: I4412b3bbfd4dadb0ab74ae718e308c1ac7a0a1e9
Reviewed-on: https://go-review.googlesource.com/66410
Reviewed-by: Rob Pike <r@golang.org>
src/text/template/doc.go
src/text/template/exec.go
src/text/template/exec_test.go
src/text/template/parse/lex.go
src/text/template/parse/lex_test.go
src/text/template/parse/node.go
src/text/template/parse/parse.go
src/text/template/parse/parse_test.go