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

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

Issue 1416093007: Experimental `getDiagnostics` request (#24480). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Review fixes. Created 5 years, 1 month 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 70c5a44378efc8856ba5a07915f145bc8588cea0..2ff2fe846d26aceaf3e59ef005a7cdbe18f6f1de 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -140,7 +140,8 @@ Domain domainFromHtml(dom.Element html) {
String name = html.attributes['name'];
String context = name ?? 'domain';
bool experimental = html.attributes['experimental'] == 'true';
- checkAttributes(html, ['name'], context, optionalAttributes: ['experimental']);
+ checkAttributes(html, ['name'], context,
+ optionalAttributes: ['experimental']);
List<Request> requests = <Request>[];
List<Notification> notifications = <Notification>[];
recurse(html, context, {
@@ -151,7 +152,8 @@ Domain domainFromHtml(dom.Element html) {
notifications.add(notificationFromHtml(child, context));
}
});
- return new Domain(name, experimental, requests, notifications, html);
+ return new Domain(name, requests, notifications, html,
+ experimental: experimental);
}
dom.Element getAncestor(dom.Element html, String name, String context) {
@@ -421,9 +423,10 @@ TypeDefinition typeDefinitionFromHtml(dom.Element html) {
checkName(html, 'type');
String name = html.attributes['name'];
String context = name != null ? name : 'type';
- checkAttributes(html, ['name'], context);
+ checkAttributes(html, ['name'], context, optionalAttributes: ['experimental']);
TypeDecl type = processContentsAsType(html, context);
- return new TypeDefinition(name, type, html);
+ bool experimental = html.attributes['experimental'] == 'true';
+ return new TypeDefinition(name, type, html, experimental: experimental);
}
/**
@@ -514,14 +517,15 @@ TypeObjectField typeObjectFieldFromHtml(dom.Element html, String context) {
* Create a [TypeObject] from an HTML description.
*/
TypeObject typeObjectFromHtml(dom.Element html, String context) {
- checkAttributes(html, [], context);
+ checkAttributes(html, [], context, optionalAttributes: ['experimental']);
List<TypeObjectField> fields = <TypeObjectField>[];
recurse(html, context, {
'field': (dom.Element child) {
fields.add(typeObjectFieldFromHtml(child, context));
}
});
- return new TypeObject(fields, html);
+ bool experimental = html.attributes['experimental'] == 'true';
+ return new TypeObject(fields, html, experimental: experimental);
}
/**
« no previous file with comments | « pkg/analysis_server/tool/spec/api.dart ('k') | pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698