]> Cypherpunks repositories - gostls13.git/commit
fmt: scan new number syntax
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 04:06:06 +0000 (23:06 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 26 Feb 2019 05:18:24 +0000 (05:18 +0000)
commitf601d412ceae1338999b203c50168af34285c634
treeba59a53896e4f17e355576766ff235d306755c0c
parentac51237affc016dd22f5b4f67dc8a2d09adf1fb2
fmt: scan new number syntax

This CL updates fmt'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: I5582af5c94059c781e6cf4e862441d3df3006adf
Reviewed-on: https://go-review.googlesource.com/c/160247
Reviewed-by: Robert Griesemer <gri@golang.org>
src/fmt/doc.go
src/fmt/scan.go
src/fmt/scan_test.go