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

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

Issue 3002543002: Support experimental annotations for the analysis server spec. (Closed)
Patch Set: Created 3 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/doc/api.html ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aac8269c6da5fbf7dcb83e9138decd9c4336e5ea..1323da9eb4159ffe6d37cb4c306a0876cbeefa47 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -131,8 +131,8 @@ class ApiReader {
});
for (String expectedAttribute in requiredAttributes) {
if (!attributesFound.contains(expectedAttribute)) {
- throw new Exception(
- '$context: ${element.localName} must contain attribute $expectedAttribute');
+ throw new Exception('$context: ${element
+ .localName} must contain attribute $expectedAttribute');
}
}
}
@@ -211,14 +211,17 @@ class ApiReader {
checkName(html, 'notification', context);
String event = html.attributes['event'];
context = '$context.${event != null ? event : 'event'}';
- checkAttributes(html, ['event'], context);
+ checkAttributes(html, ['event'], context,
+ optionalAttributes: ['experimental']);
+ bool experimental = html.attributes['experimental'] == 'true';
TypeDecl params;
recurse(html, context, {
'params': (dom.Element child) {
params = typeObjectFromHtml(child, '$context.params');
}
});
- return new Notification(domainName, event, params, html);
+ return new Notification(domainName, event, params, html,
+ experimental: experimental);
}
/**
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698