]> Cypherpunks repositories - gostls13.git/commit
go/scanner: accept new Go2 number literals
authorRobert Griesemer <gri@golang.org>
Mon, 28 Jan 2019 23:29:23 +0000 (15:29 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 11 Feb 2019 23:23:32 +0000 (23:23 +0000)
commit42e0cc604661f39baa28124247a9bac1d98fc0bb
treed051981d36641bb143e0830b696b71a113d54b2c
parentceb849dd97aebf08eee5f3683619494c56190f81
go/scanner: accept new Go2 number literals

This CL introduces go/scanner support for the new binary and octal integer
literals, hexadecimal floats, and digit separators for all number literals.
The new code is closely mirroring the respective code for number literals in
cmd/compile/internal/syntax/scanner.go.

R=Go1.13

Updates #12711.
Updates #19308.
Updates #28493.
Updates #29008.

Change-Id: I5315c6aaa7cfc41a618296be20e3acd5114d6b3c
Reviewed-on: https://go-review.googlesource.com/c/159997
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/go/scanner/scanner.go
src/go/scanner/scanner_test.go