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

Unified Diff: src/parsing/parser.h

Issue 2665513002: [parser] Lift template literal invalid escape restriction (Closed)
Patch Set: reintroduce DCHECK_EQ 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 70faf3b2df1da42c7becd36f5b04eda04ca6773c..6bdd858fe0508ff3bebac9046c7416481562d82a 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -598,7 +598,15 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
typedef TemplateLiteral* TemplateLiteralState;
TemplateLiteralState OpenTemplateLiteral(int pos);
- void AddTemplateSpan(TemplateLiteralState* state, bool tail);
+ // "should_cook" means that the span can be "cooked": in tagged template
+ // literals, both the raw and "cooked" representations are available to user
+ // code ("cooked" meaning that escape sequences are converted to their
+ // interpreted values). With the --harmony-template-escapes flag, invalid
+ // escape sequences cause the cooked span to be represented by undefined,
+ // instead of being a syntax error.
+ // "tail" indicates that this span is the last in the literal.
+ void AddTemplateSpan(TemplateLiteralState* state, bool should_cook,
+ bool tail);
void AddTemplateExpression(TemplateLiteralState* state,
Expression* expression);
Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start,
« no previous file with comments | « src/flag-definitions.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698