• Leszek Swirski's avatar
    [parser] Check assignment LHS for paren errors · df6f5f6b
    Leszek Swirski authored
    It is not legal for destructuring patterns and identifiers in declarations
    to be in parentheses. This includes nested patterns/identifiers inside
    another pattern.
    
    We were checking sub-patterns for parentheses when parsing possible
    sub-patterns, but this check missed sub-patterns with a default
    initialiser (e.g. [({x:y})=1] = {}), as the AssignmentExpression hid
    the pattern.
    
    So, we now additionally record declaration/pattern errors of an assignment
    LHS when parsing the assignment cover grammar.
    
    Bug: v8:8630
    Change-Id: Ia5a97003671fc1da7f68d7fb15943928ce9496e3
    Reviewed-on: https://chromium-review.googlesource.com/c/1404452Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58743}
    df6f5f6b
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...