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

Unified Diff: pkg/analysis_server/tool/spec/to_html.dart

Issue 469673002: Add union types to the analysis server API spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/to_html.dart
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index a1d53222c64e0b6a82cf120ad11b486e92eb71ee..ef18f00f15d0d8e5612a345e4321611a541f5186 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -195,6 +195,18 @@ class TypeVisitor extends HierarchicalApiVisitor with HtmlMixin, HtmlCodeGenerat
write(displayName);
}
}
+
+ @override
+ void visitTypeUnion(TypeUnion typeUnion) {
+ bool verticalBarNeeded = false;
+ for (TypeDecl choice in typeUnion.choices) {
+ if (verticalBarNeeded) {
+ write(' | ');
+ }
+ visitTypeDecl(choice);
+ verticalBarNeeded = true;
+ }
+ }
}
/**
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698