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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 1269393002: Fix ToStringVisitor to handle external functions (issue 23968) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | pkg/analyzer/test/generated/ast_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index f4a8ff3351aaf3c6b42318cc2ff41211e99d99ee..f110d52d77135305c8e267538d3fc7d521880161 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -17971,6 +17971,7 @@ class ToSourceVisitor implements AstVisitor<Object> {
@override
Object visitFunctionDeclaration(FunctionDeclaration node) {
_visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
+ _visitTokenWithSuffix(node.externalKeyword, " ");
_visitNodeWithSuffix(node.returnType, " ");
_visitTokenWithSuffix(node.propertyKeyword, " ");
_visitNode(node.name);
@@ -17988,7 +17989,9 @@ class ToSourceVisitor implements AstVisitor<Object> {
Object visitFunctionExpression(FunctionExpression node) {
_visitNode(node.typeParameters);
_visitNode(node.parameters);
- _writer.print(' ');
+ if (node.body is! EmptyFunctionBody) {
+ _writer.print(' ');
+ }
_visitNode(node.body);
return null;
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698