OLD | NEW |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 assignment_pattern_error_ = inner.assignment_pattern_error_; | 257 assignment_pattern_error_ = inner.assignment_pattern_error_; |
258 if (errors & DistinctFormalParametersProduction) | 258 if (errors & DistinctFormalParametersProduction) |
259 duplicate_formal_parameter_error_ = | 259 duplicate_formal_parameter_error_ = |
260 inner.duplicate_formal_parameter_error_; | 260 inner.duplicate_formal_parameter_error_; |
261 if (errors & StrictModeFormalParametersProduction) | 261 if (errors & StrictModeFormalParametersProduction) |
262 strict_mode_formal_parameter_error_ = | 262 strict_mode_formal_parameter_error_ = |
263 inner.strict_mode_formal_parameter_error_; | 263 inner.strict_mode_formal_parameter_error_; |
264 if (errors & StrongModeFormalParametersProduction) | 264 if (errors & StrongModeFormalParametersProduction) |
265 strong_mode_formal_parameter_error_ = | 265 strong_mode_formal_parameter_error_ = |
266 inner.strong_mode_formal_parameter_error_; | 266 inner.strong_mode_formal_parameter_error_; |
| 267 if (errors & LetPatternProduction) |
| 268 let_pattern_error_ = inner.let_pattern_error_; |
267 } | 269 } |
268 | 270 |
269 // As an exception to the above, the result continues to be a valid arrow | 271 // As an exception to the above, the result continues to be a valid arrow |
270 // formal parameters if the inner expression is a valid binding pattern. | 272 // formal parameters if the inner expression is a valid binding pattern. |
271 if (productions & ArrowFormalParametersProduction && | 273 if (productions & ArrowFormalParametersProduction && |
272 is_valid_arrow_formal_parameters()) { | 274 is_valid_arrow_formal_parameters()) { |
273 // Also copy function properties if expecting an arrow function | 275 // Also copy function properties if expecting an arrow function |
274 // parameter. | 276 // parameter. |
275 function_properties_ |= inner.function_properties_; | 277 function_properties_ |= inner.function_properties_; |
276 | 278 |
(...skipping 16 matching lines...) Expand all Loading... |
293 Error strict_mode_formal_parameter_error_; | 295 Error strict_mode_formal_parameter_error_; |
294 Error strong_mode_formal_parameter_error_; | 296 Error strong_mode_formal_parameter_error_; |
295 Error let_pattern_error_; | 297 Error let_pattern_error_; |
296 DuplicateFinder* duplicate_finder_; | 298 DuplicateFinder* duplicate_finder_; |
297 }; | 299 }; |
298 | 300 |
299 } // namespace internal | 301 } // namespace internal |
300 } // namespace v8 | 302 } // namespace v8 |
301 | 303 |
302 #endif // V8_EXPRESSION_CLASSIFIER_H | 304 #endif // V8_EXPRESSION_CLASSIFIER_H |
OLD | NEW |