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

Unified Diff: pkg/analyzer/lib/src/generated/sdk.dart

Issue 1401513002: Revert "Introduce the "Embedded" category." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | pkg/compiler/lib/src/apiimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/sdk.dart
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index c4f034fcdd819730c4cc9f1bac376da0af14ffb7..1bf502bb5695847cf0da1268d13642044f90c789 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -145,7 +145,7 @@ class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> {
* The name of the optional parameter used to specify the category of the
* library.
*/
- static String _CATEGORIES = "categories";
+ static String _CATEGORY = "category";
/**
* The name of the optional parameter used to specify the platforms on which
@@ -183,20 +183,6 @@ class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> {
*/
LibraryMap get librariesMap => _librariesMap;
-
- // To be backwards-compatible the new categories field is translated to
- // an old approximation.
- String convertCategories(String categories) {
- switch (categories) {
- case "": return "Internal";
- case "Client": return "Client";
- case "Server": return "Server";
- case "Client,Server": return "Shared";
- case "Client,Server,Embedded": return "Shared";
- }
- return "Shared";
- }
-
@override
Object visitMapLiteralEntry(MapLiteralEntry node) {
String libraryName = null;
@@ -214,9 +200,8 @@ class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> {
} else if (argument is NamedExpression) {
String name = argument.name.label.name;
Expression expression = argument.expression;
- if (name == _CATEGORIES) {
- library.category =
- convertCategories((expression as StringLiteral).stringValue);
+ if (name == _CATEGORY) {
+ library.category = (expression as SimpleStringLiteral).value;
} else if (name == _IMPLEMENTATION) {
library.implementation = (expression as BooleanLiteral).value;
} else if (name == _DOCUMENTED) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/apiimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698