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

Unified Diff: pkg/dev_compiler/lib/src/js_ast/template.dart

Issue 2822633003: fix #29346, ensure all nodes are implemented by DDC's code generator (Closed)
Patch Set: fix Created 3 years, 8 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
Index: pkg/dev_compiler/lib/src/js_ast/template.dart
diff --git a/pkg/dev_compiler/lib/src/js_ast/template.dart b/pkg/dev_compiler/lib/src/js_ast/template.dart
index 20fb6b62a7130d3361f6bbef911cc223c5952d97..5ecb89ef819a832c3a193274ee841910d92c121f 100644
--- a/pkg/dev_compiler/lib/src/js_ast/template.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/template.dart
@@ -739,13 +739,9 @@ class InstantiatorGeneratorVisitor implements NodeVisitor<Instantiator> {
(arguments) => new RegExpLiteral(node.pattern);
Instantiator visitTemplateString(TemplateString node) {
- Iterable makeElements =
- node.elements.map((e) => e is String ? e : visit(e));
- return (arguments) {
- return new TemplateString(makeElements
- .map((m) => m is String ? m : m(arguments))
- .toList(growable: false));
- };
+ Iterable<Instantiator> makeElements = node.interpolations.map(visit);
+ return (arguments) => new TemplateString(node.strings,
+ makeElements.map((m) => m(arguments)).toList(growable: false));
}
Instantiator visitTaggedTemplate(TaggedTemplate node) {

Powered by Google App Engine
This is Rietveld 408576698