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

Unified Diff: src/ast-numbering.cc

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement tagged template literals Created 6 years, 2 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/ast.cc ('k') | src/ast-value-factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-numbering.cc
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc
index e87842405e689a0aee131ac299b6111a1f285872..78cf4daca0e6bdd5ac858d0975b8572acd34e77c 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -84,6 +84,14 @@ void AstNumberingVisitor::VisitLiteral(Literal* node) {
}
+void AstNumberingVisitor::VisitTemplateLiteral(TemplateLiteral* node) {
+ node->set_base_id(ReserveIdRange(TemplateLiteral::num_ids()));
+ for (int i = 0; i < node->expressions()->length(); ++i) {
+ Visit(node->expressions()->at(i));
+ }
+}
+
+
void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) {
node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids()));
}
« no previous file with comments | « src/ast.cc ('k') | src/ast-value-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698