• Sathya Gunasekaran's avatar
    [numeric separator] Simplify error handling · e77eebfe
    Sathya Gunasekaran authored
    Pointing to the exact spot of the incorrect numeric separator seems
    clearer both in terms of the error itself, and the resulting code in
    scanner because we don't have to keep track of the start position.
    
    Previously, the error was:
      ➜ ./out.gn/x64.release/d8 --harmony-numeric-separator -e '0x1__1'
      unnamed:1: SyntaxError: Only one underscore is allowed as numeric separator
      0x1__1
      ^^^^
      SyntaxError: Only one underscore is allowed as numeric separator
    
    Now, the error is:
      ➜ ./out.gn/x64.release/d8 --harmony-numeric-separator -e '0x1__1'
      unnamed:1: SyntaxError: Only one underscore is allowed as numeric separator
      0x1__1
          ^
      SyntaxError: Only one underscore is allowed as numeric separator
    
    
    Bug: v8:7317
    Change-Id: I7df1b39816e51a97234da6ed0fca1bf8c0223c3e
    Reviewed-on: https://chromium-review.googlesource.com/962241
    Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51950}
    e77eebfe
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...