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

Unified Diff: frog/tree.g.dart

Issue 9653021: Add support for implicitly concatenating adjacent string literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test case. Created 8 years, 9 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 | « frog/parser.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tree.g.dart
diff --git a/frog/tree.g.dart b/frog/tree.g.dart
index 0ddd12427ccb3d0f6e67dd8a259777a2fd45070b..3a398bd46166637122a719d2fcc03a41b39bb66d 100644
--- a/frog/tree.g.dart
+++ b/frog/tree.g.dart
@@ -369,6 +369,14 @@ class LiteralExpression extends Expression {
visit(TreeVisitor visitor) => visitor.visitLiteralExpression(this);
}
+class StringConcatExpression extends Expression {
+ List<Expression> strings;
+
+ StringConcatExpression(this.strings, SourceSpan span): super(span) {}
+
+ visit(TreeVisitor visitor) => visitor.visitStringConcatExpression(this);
+}
+
class StringInterpExpression extends Expression {
List<Expression> pieces;
@@ -574,6 +582,8 @@ interface TreeVisitor {
visitLiteralExpression(LiteralExpression node);
+ visitStringConcatExpression(StringConcatExpression node);
+
visitStringInterpExpression(StringInterpExpression node);
visitSimpleTypeReference(SimpleTypeReference node);
@@ -847,6 +857,11 @@ class TreePrinter implements TreeVisitor {
output.heading('LiteralExpression(' + output.toValue(node.value) + ")", node.span);
}
+ void visitStringConcatExpression(StringConcatExpression node) {
+ output.heading('StringConcatExpression', node.span);
+ output.writeNodeList('strings', node.strings);
+ }
+
void visitStringInterpExpression(StringInterpExpression node) {
output.heading('StringInterpExpression', node.span);
output.writeNodeList('pieces', node.pieces);
« no previous file with comments | « frog/parser.dart ('k') | tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698