• 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
..
OWNERS Loading commit data...
expression-scope-reparenter.cc Loading commit data...
expression-scope-reparenter.h Loading commit data...
expression-scope.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
keywords-gen.h Loading commit data...
keywords.txt 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...
preparse-data-impl.h Loading commit data...
preparse-data.cc Loading commit data...
preparse-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...