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

Unified Diff: lib/src/source_visitor.dart

Issue 2844573002: Preserve type arguments in generic invocation expressions. (Closed)
Patch Set: 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
« no previous file with comments | « CHANGELOG.md ('k') | test/regression/0600/0621.stmt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source_visitor.dart
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index 213f7a420eb9e28a74e7db779dbb3af67b4811ca..f78627e6775ff03d1d8d60025a7b211de2592a1d 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -1151,8 +1151,16 @@ class SourceVisitor extends ThrowingAstVisitor {
}
visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+ // Try to keep the entire invocation one line.
+ builder.startSpan();
+ builder.nestExpression();
+
visit(node.function);
- visit(node.argumentList);
+ visit(node.typeArguments);
+ visitArgumentList(node.argumentList, nestExpression: false);
+
+ builder.unnest();
+ builder.endSpan();
}
visitFunctionTypeAlias(FunctionTypeAlias node) {
« no previous file with comments | « CHANGELOG.md ('k') | test/regression/0600/0621.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698