]> Cypherpunks repositories - gostls13.git/commit
text/template: accept new number syntax
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 04:21:29 +0000 (23:21 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 26 Feb 2019 05:18:38 +0000 (05:18 +0000)
commit3cf56e78d812069d2ffb65b5c29a76961b0b0af8
tree87030b7ca0a2b40a406a12db80f84d3154b9d5c4
parentf601d412ceae1338999b203c50168af34285c634
text/template: accept new number syntax

This CL updates text/template's scanner to accept the
new number syntaxes:

 - Hexadecimal floating-point values.
 - Digit-separating underscores.
 - Leading 0b and 0o prefixes.

See golang.org/design/19308-number-literals for background.

For #12711.
For #19308.
For #28493.
For #29008.

Change-Id: I68c16ea35c3f506701063781388de72bafee6b8d
Reviewed-on: https://go-review.googlesource.com/c/160248
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/html/template/template_test.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_test.go