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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2951463002: Refactor parseType in preparation for bigger changes. (Closed)
Patch Set: Created 3 years, 6 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/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index cd42481da3670f8288a263807c63f4d178154cc1..aa4106808441da7fd4051c6c81d33e11436a79f9 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1398,7 +1398,12 @@ class Printer extends Visitor<Null> {
visitFunctionDeclaration(FunctionDeclaration node) {
writeIndentation();
writeWord('function');
- writeFunction(node.function, name: getVariableName(node.variable));
+ if (node.function != null) {
+ writeFunction(node.function, name: getVariableName(node.variable));
+ } else {
+ writeWord(getVariableName(node.variable));
+ endLine('...;');
+ }
}
void writeVariableDeclaration(VariableDeclaration node,

Powered by Google App Engine
This is Rietveld 408576698