Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Unified Diff: src/parsing/expression-classifier.h

Issue 2255353002: [parser] Allow duplicate __proto__ keys in patterns (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix rebase issues Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | src/parsing/parser-base.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/expression-classifier.h
diff --git a/src/parsing/expression-classifier.h b/src/parsing/expression-classifier.h
index 8e13d0e503756a4c841919348590e7abb302e31d..c4a6a214258b2800e8a8d04e3777061169b40320 100644
--- a/src/parsing/expression-classifier.h
+++ b/src/parsing/expression-classifier.h
@@ -345,6 +345,13 @@ class ExpressionClassifier {
invalid_productions_ &= ~AssignmentPatternProduction;
}
+ void ForgiveExpressionError() {
+ if (!(invalid_productions_ & ExpressionProduction)) return;
+ Error& e = reported_error(kExpressionProduction);
+ e.kind = kUnusedError;
+ invalid_productions_ &= ~ExpressionProduction;
+ }
+
void Accumulate(ExpressionClassifier* inner,
unsigned productions = StandardProductions,
bool merge_non_patterns = true) {
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | src/parsing/parser-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698