| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
| 6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
| (...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2730 false); | 2730 false); |
| 2731 } | 2731 } |
| 2732 } | 2732 } |
| 2733 | 2733 |
| 2734 if (in_class && escaped_static && !is_static) { | 2734 if (in_class && escaped_static && !is_static) { |
| 2735 ReportUnexpectedTokenAt(scanner()->location(), name_token); | 2735 ReportUnexpectedTokenAt(scanner()->location(), name_token); |
| 2736 *ok = false; | 2736 *ok = false; |
| 2737 return this->EmptyObjectLiteralProperty(); | 2737 return this->EmptyObjectLiteralProperty(); |
| 2738 } | 2738 } |
| 2739 | 2739 |
| 2740 BindingPatternUnexpectedToken(classifier); |
| 2741 |
| 2740 if (is_generator || peek() == Token::LPAREN) { | 2742 if (is_generator || peek() == Token::LPAREN) { |
| 2741 // MethodDefinition | 2743 // MethodDefinition |
| 2742 // PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}' | 2744 // PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}' |
| 2743 // '*' PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}' | 2745 // '*' PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}' |
| 2744 if (!*is_computed_name) { | 2746 if (!*is_computed_name) { |
| 2745 checker->CheckProperty(name_token, kMethodProperty, is_static, | 2747 checker->CheckProperty(name_token, kMethodProperty, is_static, |
| 2746 is_generator, | 2748 is_generator, |
| 2747 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); | 2749 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
| 2748 } | 2750 } |
| 2749 | 2751 |
| (...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4253 return; | 4255 return; |
| 4254 } | 4256 } |
| 4255 has_seen_constructor_ = true; | 4257 has_seen_constructor_ = true; |
| 4256 return; | 4258 return; |
| 4257 } | 4259 } |
| 4258 } | 4260 } |
| 4259 } // namespace internal | 4261 } // namespace internal |
| 4260 } // namespace v8 | 4262 } // namespace v8 |
| 4261 | 4263 |
| 4262 #endif // V8_PARSING_PREPARSER_H | 4264 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |