-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-tech-debtIssues that slow or block desirable development paths for Dartdoc, or create such problems for usersIssues that slow or block desirable development paths for Dartdoc, or create such problems for users
Description
Dartdoc has a system of "special classes" (see special_elements.dart), which are classes defined in the Dart SDK, and which are then used in a few different ways, comparing elements found while documenting with elements from the SDK. For example, "pragma" annotations are treated specially, so when we find an annotated element, we compare each annotation to "pragma".
Instead of taking the strategy that analyzer takes, Dartdoc's SpecialClass and SpecialClasses types hold on to references of the actual special types found in the SDK (like Object and pragma). There is little or no gain to this complex system; we can instead implement predicates like the analyzer has:
class ClassElement {
bool get isDartCoreObject => name == 'Object' && library.isDartCore;
}
class LibraryElement {
bool get isDartCore => name == "dart.core";
}Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ontype-tech-debtIssues that slow or block desirable development paths for Dartdoc, or create such problems for usersIssues that slow or block desirable development paths for Dartdoc, or create such problems for users