• Toon Verwaest's avatar
    [parser] Drop ExpressionClassifier::ArrowFormalsParameterProduction and BP_to_AFP · 71f59a23
    Toon Verwaest authored
    Instead, simply track it as a valid binding pattern. To do this in the case of
    parenthesized formals, we delay throwing the binding pattern error for
    parenthesized (and async "calls") until we know it's not an arrow function head
    by itself.
    
    This guarantees that if an arrow head is a valid binding pattern, it's either a
    valid parenthesized head or a valid identifier, or invalid pattern ("array" or
    "object" literal style). We can detect the latter case by checking that the
    current token is not a RPAREN and the expression isn't an identifier.
    (Alternatively we could check that the curren token is RBRACE or RBRACK...)
    
    Bug: chromium:907575
    Change-Id: Ie40cc3235d3188f2620b6c089a0f49d93604dda6
    Reviewed-on: https://chromium-review.googlesource.com/c/1348078Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57743}
    71f59a23
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...