• adamk's avatar
    Remove AssignmentExpressionFlags enum, handle error checking in callers · 1003785c
    adamk authored
    This is hopefully the last in a series of cleanup patches around
    destructuring assignment. It simplifies the ParseAssignmentExpression
    API, making the callers call CheckDestructuringElement() where appropriate.
    CheckDestructuringElement has been further simplified to only emit the
    errors that the parser depends on it emitting.
    
    I've also beefed up the test coverage in test-parsing.cc to
    handling all the destructuring flags being on, which caught an oddity
    in how we disallow initializers in spreads in patterns (we need to treat
    RewritableAssignmentExpressions as Assignments for the purpose of
    error checking).
    
    Finally, I added a few helper methods to ParserBase to handle a few
    classes of expressions (assignments and literals-as-patterns).
    
    Review URL: https://codereview.chromium.org/1696603002
    
    Cr-Commit-Position: refs/heads/master@{#33961}
    1003785c
Name
Last commit
Last update
..
OWNERS Loading commit data...
expression-classifier.h Loading commit data...
func-name-inferrer.cc Loading commit data...
func-name-inferrer.h Loading commit data...
parameter-initializer-rewriter.cc Loading commit data...
parameter-initializer-rewriter.h Loading commit data...
parser-base.h Loading commit data...
parser.cc Loading commit data...
parser.h Loading commit data...
pattern-rewriter.cc Loading commit data...
preparse-data-format.h Loading commit data...
preparse-data.cc Loading commit data...
preparse-data.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.cc Loading commit data...
scanner.h Loading commit data...
token.cc Loading commit data...
token.h Loading commit data...