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

Side by Side Diff: src/parsing/preparser.h

Issue 2665513002: [parser] Lift template literal invalid escape restriction (Closed)
Patch Set: add test Created 3 years, 10 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
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_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/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 PreParserFormalParameters* formals, bool has_duplicate_parameters, 979 PreParserFormalParameters* formals, bool has_duplicate_parameters,
980 bool maybe_abort, bool* ok); 980 bool maybe_abort, bool* ok);
981 981
982 struct TemplateLiteralState {}; 982 struct TemplateLiteralState {};
983 983
984 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) { 984 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) {
985 return TemplateLiteralState(); 985 return TemplateLiteralState();
986 } 986 }
987 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state, 987 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state,
988 PreParserExpression expression) {} 988 PreParserExpression expression) {}
989 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail) {} 989 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool should_cook,
990 bool tail) {}
990 V8_INLINE PreParserExpression CloseTemplateLiteral( 991 V8_INLINE PreParserExpression CloseTemplateLiteral(
991 TemplateLiteralState* state, int start, PreParserExpression tag); 992 TemplateLiteralState* state, int start, PreParserExpression tag);
992 V8_INLINE void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {} 993 V8_INLINE void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {}
993 994
994 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) { 995 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) {
995 scope->SetLanguageMode(mode); 996 scope->SetLanguageMode(mode);
996 } 997 }
997 V8_INLINE void SetAsmModule() {} 998 V8_INLINE void SetAsmModule() {}
998 999
999 V8_INLINE void MarkCollectedTailCallExpressions() {} 1000 V8_INLINE void MarkCollectedTailCallExpressions() {}
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state, 1716 PreParserExpression PreParser::CloseTemplateLiteral(TemplateLiteralState* state,
1716 int start, 1717 int start,
1717 PreParserExpression tag) { 1718 PreParserExpression tag) {
1718 return EmptyExpression(); 1719 return EmptyExpression();
1719 } 1720 }
1720 1721
1721 } // namespace internal 1722 } // namespace internal
1722 } // namespace v8 1723 } // namespace v8
1723 1724
1724 #endif // V8_PARSING_PREPARSER_H 1725 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698