Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: src/parsing/parser-base.h

Issue 1806063002: [parser] report illegal token error in ParseMemberExpressionContinuation() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 if (expression->IsFunctionLiteral() && mode() == PARSE_EAGERLY) { 2609 if (expression->IsFunctionLiteral() && mode() == PARSE_EAGERLY) {
2610 // If the tag function looks like an IIFE, set_parenthesized() to 2610 // If the tag function looks like an IIFE, set_parenthesized() to
2611 // force eager compilation. 2611 // force eager compilation.
2612 expression->AsFunctionLiteral()->set_should_eager_compile(); 2612 expression->AsFunctionLiteral()->set_should_eager_compile();
2613 } 2613 }
2614 } 2614 }
2615 expression = 2615 expression =
2616 ParseTemplateLiteral(expression, pos, classifier, CHECK_OK); 2616 ParseTemplateLiteral(expression, pos, classifier, CHECK_OK);
2617 break; 2617 break;
2618 } 2618 }
2619 case Token::ILLEGAL: {
2620 ReportUnexpectedTokenAt(scanner()->peek_location(), Token::ILLEGAL);
2621 *ok = false;
2622 return this->EmptyExpression();
2623 }
2619 default: 2624 default:
2620 return expression; 2625 return expression;
2621 } 2626 }
2622 } 2627 }
2623 DCHECK(false); 2628 DCHECK(false);
2624 return this->EmptyExpression(); 2629 return this->EmptyExpression();
2625 } 2630 }
2626 2631
2627 2632
2628 template <class Traits> 2633 template <class Traits>
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 has_seen_constructor_ = true; 3087 has_seen_constructor_ = true;
3083 return; 3088 return;
3084 } 3089 }
3085 } 3090 }
3086 3091
3087 3092
3088 } // namespace internal 3093 } // namespace internal
3089 } // namespace v8 3094 } // namespace v8
3090 3095
3091 #endif // V8_PARSING_PARSER_BASE_H 3096 #endif // V8_PARSING_PARSER_BASE_H
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698