• Robert Griesemer's avatar
    text/scanner: accept new Go2 number literals · 710417bc
    Robert Griesemer authored
    This CL introduces text/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.
    
    Uniformly use the term "invalid" rather than "illegal" in error messages
    to match the respective error messages in the other scanners directly.
    
    R=Go1.13
    
    Updates #12711.
    Updates #19308.
    Updates #28493.
    Updates #29008.
    
    Change-Id: I2f291de13ba5afc0e530cd8326e6bf4c3858ebac
    Reviewed-on: https://go-review.googlesource.com/c/161199
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    710417bc
scanner_test.go 24.2 KB