• Toon Verwaest's avatar
    [parser] Further simplify ParseAssignmentExpression · 2eab4de3
    Toon Verwaest authored
    This moves is_async and parenthesized_formals tracking out of the
    ParseAssignmentExpression header. Instead we set flags on the parser for the
    next arrow function: next_arrow_function_kind_ that defaults to kArrowFunction
    and next_arrow_formals_parenthesized_ which defaults to false.
    
    If we end up recognizing an async arrow head, we update
    next_arrow_function_kind_ to kAsyncArrowFunction. If we detect (...) followed
    by => or async(...) followed by => we set next_arrow_formals_parenthesized_ to
    true. When we start parsing the arrow continuation we consume the values and
    reset them to default for the next arrow function.
    
    Change-Id: Ia22c0068fea0f175fafc568b7339813fd10c3b5a
    Reviewed-on: https://chromium-review.googlesource.com/c/1345996
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57684}
    2eab4de3
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...