Chromium Code Reviews| 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_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_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 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2764 | 2764 |
| 2765 template <class Traits> | 2765 template <class Traits> |
| 2766 bool ParserBase<Traits>::IsNextLetKeyword() { | 2766 bool ParserBase<Traits>::IsNextLetKeyword() { |
| 2767 DCHECK(peek() == Token::LET); | 2767 DCHECK(peek() == Token::LET); |
| 2768 Token::Value next_next = PeekAhead(); | 2768 Token::Value next_next = PeekAhead(); |
| 2769 switch (next_next) { | 2769 switch (next_next) { |
| 2770 case Token::LBRACE: | 2770 case Token::LBRACE: |
| 2771 case Token::LBRACK: | 2771 case Token::LBRACK: |
| 2772 case Token::IDENTIFIER: | 2772 case Token::IDENTIFIER: |
| 2773 case Token::STATIC: | 2773 case Token::STATIC: |
| 2774 case Token::LET: // Yes, you can do let let = ... in sloppy mode | 2774 case Token::LET: // Yes, you can do let let = ... in sloppy mode |
|
Dan Ehrenberg
2016/04/20 20:59:56
Actually, this comment reflects a previous misunde
mike3
2016/04/21 19:51:20
No worries; I'll remove this line while I'm at it.
| |
| 2775 case Token::YIELD: | 2775 case Token::YIELD: |
| 2776 return true; | 2776 return true; |
| 2777 case Token::FUTURE_STRICT_RESERVED_WORD: | |
| 2778 return is_sloppy(language_mode()); | |
| 2777 default: | 2779 default: |
| 2778 return false; | 2780 return false; |
| 2779 } | 2781 } |
| 2780 } | 2782 } |
| 2781 | 2783 |
| 2782 | 2784 |
| 2783 template <class Traits> | 2785 template <class Traits> |
| 2784 typename ParserBase<Traits>::ExpressionT | 2786 typename ParserBase<Traits>::ExpressionT |
| 2785 ParserBase<Traits>::ParseArrowFunctionLiteral( | 2787 ParserBase<Traits>::ParseArrowFunctionLiteral( |
| 2786 bool accept_IN, const FormalParametersT& formal_parameters, | 2788 bool accept_IN, const FormalParametersT& formal_parameters, |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3096 has_seen_constructor_ = true; | 3098 has_seen_constructor_ = true; |
| 3097 return; | 3099 return; |
| 3098 } | 3100 } |
| 3099 } | 3101 } |
| 3100 | 3102 |
| 3101 | 3103 |
| 3102 } // namespace internal | 3104 } // namespace internal |
| 3103 } // namespace v8 | 3105 } // namespace v8 |
| 3104 | 3106 |
| 3105 #endif // V8_PARSING_PARSER_BASE_H | 3107 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |