Index: pkg/analyzer_plugin/tool/spec/from_html.dart |
diff --git a/pkg/analyzer_plugin/tool/spec/from_html.dart b/pkg/analyzer_plugin/tool/spec/from_html.dart |
index 8b5a97485e8ab2d2af63f98a9c6fcdd226e33f03..47da9c7b1726ad5d58a5fbdecc35f315c25255f6 100644 |
--- a/pkg/analyzer_plugin/tool/spec/from_html.dart |
+++ b/pkg/analyzer_plugin/tool/spec/from_html.dart |
@@ -393,8 +393,9 @@ Request requestFromHtml(dom.Element html, String context) { |
String method = html.attributes['method']; |
context = '$context.${method != null ? method : 'method'}'; |
checkAttributes(html, ['method'], context, |
- optionalAttributes: ['experimental']); |
+ optionalAttributes: ['experimental', 'deprecated']); |
bool experimental = html.attributes['experimental'] == 'true'; |
+ bool deprecated = html.attributes['deprecated'] == 'true'; |
TypeDecl params; |
TypeDecl result; |
recurse(html, context, { |
@@ -406,7 +407,7 @@ Request requestFromHtml(dom.Element html, String context) { |
} |
}); |
return new Request(domainName, method, params, result, html, |
- experimental: experimental); |
+ experimental: experimental, deprecated: deprecated); |
} |
/** |
@@ -425,10 +426,12 @@ TypeDefinition typeDefinitionFromHtml(dom.Element html) { |
String name = html.attributes['name']; |
String context = name != null ? name : 'type'; |
checkAttributes(html, ['name'], context, |
- optionalAttributes: ['experimental']); |
+ optionalAttributes: ['experimental', 'deprecated']); |
TypeDecl type = processContentsAsType(html, context); |
bool experimental = html.attributes['experimental'] == 'true'; |
- return new TypeDefinition(name, type, html, experimental: experimental); |
+ bool deprecated = html.attributes['deprecated'] == 'true'; |
+ return new TypeDefinition(name, type, html, |
+ experimental: experimental, deprecated: deprecated); |
} |
/** |
@@ -459,7 +462,8 @@ TypeEnum typeEnumFromHtml(dom.Element html, String context) { |
*/ |
TypeEnumValue typeEnumValueFromHtml(dom.Element html, String context) { |
checkName(html, 'value', context); |
- checkAttributes(html, [], context); |
+ checkAttributes(html, [], context, optionalAttributes: ['deprecated']); |
+ bool deprecated = html.attributes['deprecated'] == 'true'; |
List<String> values = <String>[]; |
recurse(html, context, { |
'code': (dom.Element child) { |
@@ -470,7 +474,7 @@ TypeEnumValue typeEnumValueFromHtml(dom.Element html, String context) { |
if (values.length != 1) { |
throw new Exception('$context: Exactly one value must be specified'); |
} |
- return new TypeEnumValue(values[0], html); |
+ return new TypeEnumValue(values[0], html, deprecated: deprecated); |
} |
/** |
@@ -493,7 +497,8 @@ TypeObjectField typeObjectFieldFromHtml(dom.Element html, String context) { |
String name = html.attributes['name']; |
context = '$context.${name != null ? name : 'field'}'; |
checkAttributes(html, ['name'], context, |
- optionalAttributes: ['optional', 'value']); |
+ optionalAttributes: ['optional', 'value', 'deprecated']); |
+ bool deprecated = html.attributes['deprecated'] == 'true'; |
bool optional = false; |
String optionalString = html.attributes['optional']; |
if (optionalString != null) { |
@@ -512,7 +517,7 @@ TypeObjectField typeObjectFieldFromHtml(dom.Element html, String context) { |
String value = html.attributes['value']; |
TypeDecl type = processContentsAsType(html, context); |
return new TypeObjectField(name, type, html, |
- optional: optional, value: value); |
+ optional: optional, value: value, deprecated: deprecated); |
} |
/** |