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

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

Issue 2665513002: [parser] Lift template literal invalid escape restriction (Closed)
Patch Set: rebase harder 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 PreParserFormalParameters* formals, bool has_duplicate_parameters, 966 PreParserFormalParameters* formals, bool has_duplicate_parameters,
967 bool maybe_abort, bool* ok); 967 bool maybe_abort, bool* ok);
968 968
969 struct TemplateLiteralState {}; 969 struct TemplateLiteralState {};
970 970
971 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) { 971 V8_INLINE TemplateLiteralState OpenTemplateLiteral(int pos) {
972 return TemplateLiteralState(); 972 return TemplateLiteralState();
973 } 973 }
974 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state, 974 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state,
975 PreParserExpression expression) {} 975 PreParserExpression expression) {}
976 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail) {} 976 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool should_cook,
977 bool tail) {}
977 V8_INLINE PreParserExpression CloseTemplateLiteral( 978 V8_INLINE PreParserExpression CloseTemplateLiteral(
978 TemplateLiteralState* state, int start, PreParserExpression tag); 979 TemplateLiteralState* state, int start, PreParserExpression tag);
979 V8_INLINE void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {} 980 V8_INLINE void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {}
980 981
981 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) { 982 V8_INLINE void SetLanguageMode(Scope* scope, LanguageMode mode) {
982 scope->SetLanguageMode(mode); 983 scope->SetLanguageMode(mode);
983 } 984 }
984 V8_INLINE void SetAsmModule() {} 985 V8_INLINE void SetAsmModule() {}
985 986
986 V8_INLINE void MarkCollectedTailCallExpressions() {} 987 V8_INLINE void MarkCollectedTailCallExpressions() {}
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 function_state_->NextMaterializedLiteralIndex(); 1682 function_state_->NextMaterializedLiteralIndex();
1682 function_state_->NextMaterializedLiteralIndex(); 1683 function_state_->NextMaterializedLiteralIndex();
1683 } 1684 }
1684 return EmptyExpression(); 1685 return EmptyExpression();
1685 } 1686 }
1686 1687
1687 } // namespace internal 1688 } // namespace internal
1688 } // namespace v8 1689 } // namespace v8
1689 1690
1690 #endif // V8_PARSING_PREPARSER_H 1691 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698