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

Side by Side Diff: src/expression-classifier.h

Issue 1168643005: [es6] parse destructuring assignment (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP #1 Created 5 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 unified diff | Download patch
« no previous file with comments | « src/ast.h ('k') | src/messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_EXPRESSION_CLASSIFIER_H 5 #ifndef V8_EXPRESSION_CLASSIFIER_H
6 #define V8_EXPRESSION_CLASSIFIER_H 6 #define V8_EXPRESSION_CLASSIFIER_H
7 7
8 #include "src/messages.h" 8 #include "src/messages.h"
9 #include "src/scanner.h" 9 #include "src/scanner.h"
10 #include "src/token.h" 10 #include "src/token.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void RecordAssignmentPatternError(const Scanner::Location& loc, 134 void RecordAssignmentPatternError(const Scanner::Location& loc,
135 MessageTemplate::Template message, 135 MessageTemplate::Template message,
136 const char* arg = nullptr) { 136 const char* arg = nullptr) {
137 if (!is_valid_assignment_pattern()) return; 137 if (!is_valid_assignment_pattern()) return;
138 invalid_productions_ |= AssignmentPatternProduction; 138 invalid_productions_ |= AssignmentPatternProduction;
139 assignment_pattern_error_.location = loc; 139 assignment_pattern_error_.location = loc;
140 assignment_pattern_error_.message = message; 140 assignment_pattern_error_.message = message;
141 assignment_pattern_error_.arg = arg; 141 assignment_pattern_error_.arg = arg;
142 } 142 }
143 143
144 void RecordPatternError(const Scanner::Location& loc,
145 MessageTemplate::Template message,
146 const char* arg = nullptr) {
147 RecordBindingPatternError(loc, message, arg);
148 RecordAssignmentPatternError(loc, message, arg);
149 }
150
144 void RecordArrowFormalParametersError(const Scanner::Location& loc, 151 void RecordArrowFormalParametersError(const Scanner::Location& loc,
145 MessageTemplate::Template message, 152 MessageTemplate::Template message,
146 const char* arg = nullptr) { 153 const char* arg = nullptr) {
147 if (!is_valid_arrow_formal_parameters()) return; 154 if (!is_valid_arrow_formal_parameters()) return;
148 invalid_productions_ |= ArrowFormalParametersProduction; 155 invalid_productions_ |= ArrowFormalParametersProduction;
149 arrow_formal_parameters_error_.location = loc; 156 arrow_formal_parameters_error_.location = loc;
150 arrow_formal_parameters_error_.message = message; 157 arrow_formal_parameters_error_.message = message;
151 arrow_formal_parameters_error_.arg = arg; 158 arrow_formal_parameters_error_.arg = arg;
152 } 159 }
153 160
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 Error arrow_formal_parameters_error_; 238 Error arrow_formal_parameters_error_;
232 Error duplicate_formal_parameter_error_; 239 Error duplicate_formal_parameter_error_;
233 Error strict_mode_formal_parameter_error_; 240 Error strict_mode_formal_parameter_error_;
234 Error strong_mode_formal_parameter_error_; 241 Error strong_mode_formal_parameter_error_;
235 DuplicateFinder* duplicate_finder_; 242 DuplicateFinder* duplicate_finder_;
236 }; 243 };
237 } 244 }
238 } // v8::internal 245 } // v8::internal
239 246
240 #endif // V8_EXPRESSION_CLASSIFIER_H 247 #endif // V8_EXPRESSION_CLASSIFIER_H
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698