compiler: support new numeric literal syntax

Programming / Compilers / GCC - ian [138bc75d-0d04-0410-961f-82ee72b054a4] - 17 August 2019 23:47 EDT

Support 0b, 0o, and hex floats.

Tested against test/literal2.go in the gc repo.

Updates golang/go#12711 Updates golang/go#19308 Updates golang/go#28493 Updates golang/go#29008

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/189718

a3bc8ca83aa compiler: support new numeric literal syntax
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/lex.cc | 279 ++++++++++++++++++++++++++++++++++++-----------
gcc/go/gofrontend/lex.h | 8 +-
3 files changed, 224 insertions(+), 65 deletions(-)

Upstream: gcc.gnu.org


  • Share