| 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/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2844 | 2844 |
| 2845 if (peek() != Token::RBRACE) { | 2845 if (peek() != Token::RBRACE) { |
| 2846 ReportMessageAt(Scanner::Location(pos, peek_position()), | 2846 ReportMessageAt(Scanner::Location(pos, peek_position()), |
| 2847 "unterminated_template_expr"); | 2847 "unterminated_template_expr"); |
| 2848 *ok = false; | 2848 *ok = false; |
| 2849 return Traits::EmptyExpression(); | 2849 return Traits::EmptyExpression(); |
| 2850 } | 2850 } |
| 2851 | 2851 |
| 2852 // If we didn't die parsing that expression, our next token should be a | 2852 // If we didn't die parsing that expression, our next token should be a |
| 2853 // TEMPLATE_SPAN or TEMPLATE_TAIL. | 2853 // TEMPLATE_SPAN or TEMPLATE_TAIL. |
| 2854 next = scanner()->ScanTemplateSpan(); | 2854 next = scanner()->ScanTemplateContinuation(); |
| 2855 Next(); | 2855 Next(); |
| 2856 | 2856 |
| 2857 if (!next) { | 2857 if (!next) { |
| 2858 ReportMessageAt(Scanner::Location(start, position()), | 2858 ReportMessageAt(Scanner::Location(start, position()), |
| 2859 "unterminated_template"); | 2859 "unterminated_template"); |
| 2860 *ok = false; | 2860 *ok = false; |
| 2861 return Traits::EmptyExpression(); | 2861 return Traits::EmptyExpression(); |
| 2862 } | 2862 } |
| 2863 | 2863 |
| 2864 Traits::AddTemplateSpan(&ts, next == Token::TEMPLATE_TAIL); | 2864 Traits::AddTemplateSpan(&ts, next == Token::TEMPLATE_TAIL); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2922 DCHECK(IsAccessorAccessorConflict(old_type, type)); | 2922 DCHECK(IsAccessorAccessorConflict(old_type, type)); |
| 2923 // Both accessors of the same type. | 2923 // Both accessors of the same type. |
| 2924 parser()->ReportMessage("accessor_get_set"); | 2924 parser()->ReportMessage("accessor_get_set"); |
| 2925 } | 2925 } |
| 2926 *ok = false; | 2926 *ok = false; |
| 2927 } | 2927 } |
| 2928 } | 2928 } |
| 2929 } } // v8::internal | 2929 } } // v8::internal |
| 2930 | 2930 |
| 2931 #endif // V8_PREPARSER_H | 2931 #endif // V8_PREPARSER_H |
| OLD | NEW |