Chromium Code Reviews| 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..d15292ec0f2f2a3e00b6e7eb7355ed962be93e10 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,18 @@ 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'; |
| + if (experimental) { |
| + print('exp'); |
|
scheglov
2015/11/05 21:22:22
Debug code?
pquitslund
2015/11/05 22:28:54
Done.
|
| + } |
| + return new TypeObject(fields, html, experimental: experimental); |
| } |
| /** |