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

Unified Diff: src/scanner.h

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased against https://chromium.googlesource.com/v8/v8.git/master Created 6 years, 1 month 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
« src/preparser.h ('K') | « src/preparser.h ('k') | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index e626f206c74952c856d77d55b708b9e01661b1ac..46e6d32212a19e822a9ad18ab4eae35b9be90bb1 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -458,6 +458,8 @@ class Scanner {
void SetHarmonyClasses(bool classes) {
harmony_classes_ = classes;
}
+ bool HarmonyTemplates() const { return harmony_templates_; }
+ void SetHarmonyTemplates(bool templates) { harmony_templates_ = templates; }
// Returns true if there was a line terminator before the peek'ed token,
// possibly inside a multi-line comment.
@@ -473,6 +475,9 @@ class Scanner {
// be empty).
bool ScanRegExpFlags();
+ // Scans the input as a template literal
+ Token::Value ScanTemplateSpan();
+
const LiteralBuffer* source_url() const { return &source_url_; }
const LiteralBuffer* source_mapping_url() const {
return &source_mapping_url_;
@@ -681,6 +686,8 @@ class Scanner {
bool harmony_numeric_literals_;
// Whether we scan 'class', 'extends', 'static' and 'super' as keywords.
bool harmony_classes_;
+ // Whether we scan TEMPLATE_SPAN and TEMPLATE_TAIL
+ bool harmony_templates_;
};
} } // namespace v8::internal
« src/preparser.h ('K') | « src/preparser.h ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698