• 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
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps 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...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes 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...