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

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

Issue 479043002: Code generate Dart classes representing the analysis server API. (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
Index: pkg/analysis_server/tool/spec/from_html.dart
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index c1513b8e14908fbdb0f985db266c2ce7e9532649..d3b201aa4b388c1476f23794ed36865764010bcd 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -388,8 +388,9 @@ List<TypeDecl> processContentsAsTypes(dom.Element html) {
types.add(new TypeReference(innerText(child), child));
},
'union': (dom.Element child) {
- checkAttributes(child, []);
- types.add(new TypeUnion(processContentsAsTypes(child), child));
+ checkAttributes(child, ['field']);
+ String field = child.attributes['field'];
+ types.add(new TypeUnion(processContentsAsTypes(child), field, child));
}
});
return types;

Powered by Google App Engine
This is Rietveld 408576698