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_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
7 | 7 |
8 #include "src/bailout-reason.h" | 8 #include "src/bailout-reason.h" |
9 #include "src/expression-classifier.h" | 9 #include "src/expression-classifier.h" |
10 #include "src/func-name-inferrer.h" | 10 #include "src/func-name-inferrer.h" |
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 case Token::TEMPLATE_SPAN: | 2397 case Token::TEMPLATE_SPAN: |
2398 case Token::TEMPLATE_TAIL: | 2398 case Token::TEMPLATE_TAIL: |
2399 classifier->RecordBindingPatternError( | 2399 classifier->RecordBindingPatternError( |
2400 scanner()->peek_location(), | 2400 scanner()->peek_location(), |
2401 MessageTemplate::kUnexpectedTemplateString); | 2401 MessageTemplate::kUnexpectedTemplateString); |
2402 return this->ParseTemplateLiteral(Traits::NoTemplateTag(), beg_pos, | 2402 return this->ParseTemplateLiteral(Traits::NoTemplateTag(), beg_pos, |
2403 classifier, ok); | 2403 classifier, ok); |
2404 | 2404 |
2405 case Token::MOD: | 2405 case Token::MOD: |
2406 if (allow_natives() || extension_ != NULL) { | 2406 if (allow_natives() || extension_ != NULL) { |
| 2407 BindingPatternUnexpectedToken(classifier); |
2407 return this->ParseV8Intrinsic(ok); | 2408 return this->ParseV8Intrinsic(ok); |
2408 } | 2409 } |
2409 break; | 2410 break; |
2410 | 2411 |
2411 case Token::DO: | 2412 case Token::DO: |
2412 if (allow_harmony_do_expressions()) { | 2413 if (allow_harmony_do_expressions()) { |
2413 BindingPatternUnexpectedToken(classifier); | 2414 BindingPatternUnexpectedToken(classifier); |
2414 return Traits::ParseDoExpression(ok); | 2415 return Traits::ParseDoExpression(ok); |
2415 } | 2416 } |
2416 break; | 2417 break; |
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4198 return; | 4199 return; |
4199 } | 4200 } |
4200 has_seen_constructor_ = true; | 4201 has_seen_constructor_ = true; |
4201 return; | 4202 return; |
4202 } | 4203 } |
4203 } | 4204 } |
4204 } // namespace internal | 4205 } // namespace internal |
4205 } // namespace v8 | 4206 } // namespace v8 |
4206 | 4207 |
4207 #endif // V8_PREPARSER_H | 4208 #endif // V8_PREPARSER_H |
OLD | NEW |