• Leszek Swirski's avatar
    [parser] Switch on token in ScanSingleToken · ed77644b
    Leszek Swirski authored
    Always generate a token for the first character in ScanSingleToken, and
    switch on that. If the token could change with subsequent characters, e.g.
    Token::ADD into Token::ASSIGN_ADD, then handle that in that token's case
    rather than going character-by-character.
    
    This allows us to have a tighter packing of the cases, and early detect
    numbers, keywords and identifiers.
    
    Change-Id: I8c3ac7a5453547abeb09fc90826a26390b15a415
    Reviewed-on: https://chromium-review.googlesource.com/c/1335547Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57497}
    ed77644b
Name
Last commit
Last update
..
OWNERS Loading commit data...
expression-classifier.h Loading commit data...
expression-scope-reparenter.cc Loading commit data...
expression-scope-reparenter.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
parse-info.cc Loading commit data...
parse-info.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
parsing.cc Loading commit data...
parsing.h Loading commit data...
pattern-rewriter.cc Loading commit data...
preparsed-scope-data-impl.h Loading commit data...
preparsed-scope-data.cc Loading commit data...
preparsed-scope-data.h Loading commit data...
preparser-logger.h Loading commit data...
preparser.cc Loading commit data...
preparser.h Loading commit data...
rewriter.cc Loading commit data...
rewriter.h Loading commit data...
scanner-character-streams.cc Loading commit data...
scanner-character-streams.h Loading commit data...
scanner-inl.h Loading commit data...
scanner.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...