From 0d4c0d03657453a2dc5d9290c7886166dc620c03 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 22 Jul 2022 13:27:48 -0700 Subject: [PATCH] Recategorize selectors as "AST" for Dartdoc (#1752) This more closely matches the categorization of other AST nodes, which aren't broken down into fine-grained categories. This also adds the "Parsing" category to selector classes that have `parse()` methods. --- lib/src/ast/selector.dart | 2 +- lib/src/ast/selector/attribute.dart | 2 +- lib/src/ast/selector/class.dart | 2 +- lib/src/ast/selector/combinator.dart | 2 +- lib/src/ast/selector/complex.dart | 3 ++- lib/src/ast/selector/complex_component.dart | 2 +- lib/src/ast/selector/compound.dart | 3 ++- lib/src/ast/selector/id.dart | 2 +- lib/src/ast/selector/list.dart | 3 ++- lib/src/ast/selector/parent.dart | 2 +- lib/src/ast/selector/placeholder.dart | 2 +- lib/src/ast/selector/pseudo.dart | 2 +- lib/src/ast/selector/qualified_name.dart | 2 +- lib/src/ast/selector/simple.dart | 3 ++- lib/src/ast/selector/type.dart | 2 +- lib/src/ast/selector/universal.dart | 2 +- 16 files changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/src/ast/selector.dart b/lib/src/ast/selector.dart index 73fe043c..6934dab8 100644 --- a/lib/src/ast/selector.dart +++ b/lib/src/ast/selector.dart @@ -37,7 +37,7 @@ export 'selector/universal.dart'; /// /// Selectors have structural equality semantics. /// -/// {@category Selector} +/// {@category AST} abstract class Selector { /// Whether this selector, and complex selectors containing it, should not be /// emitted. diff --git a/lib/src/ast/selector/attribute.dart b/lib/src/ast/selector/attribute.dart index df4d6941..55c40d5c 100644 --- a/lib/src/ast/selector/attribute.dart +++ b/lib/src/ast/selector/attribute.dart @@ -12,7 +12,7 @@ import '../selector.dart'; /// This selects for elements with the given attribute, and optionally with a /// value matching certain conditions as well. /// -/// {@category Selector} +/// {@category AST} @sealed class AttributeSelector extends SimpleSelector { /// The name of the attribute being selected for. diff --git a/lib/src/ast/selector/class.dart b/lib/src/ast/selector/class.dart index 8fc96da0..513d46d4 100644 --- a/lib/src/ast/selector/class.dart +++ b/lib/src/ast/selector/class.dart @@ -12,7 +12,7 @@ import '../selector.dart'; /// This selects elements whose `class` attribute contains an identifier with /// the given name. /// -/// {@category Selector} +/// {@category AST} @sealed class ClassSelector extends SimpleSelector { /// The class name this selects for. diff --git a/lib/src/ast/selector/combinator.dart b/lib/src/ast/selector/combinator.dart index 74fa0931..cdffa0c8 100644 --- a/lib/src/ast/selector/combinator.dart +++ b/lib/src/ast/selector/combinator.dart @@ -7,7 +7,7 @@ import 'package:meta/meta.dart'; /// A combinator that defines the relationship between selectors in a /// [ComplexSelector]. /// -/// {@category Selector} +/// {@category AST} @sealed class Combinator { /// Matches the right-hand selector if it's immediately adjacent to the diff --git a/lib/src/ast/selector/complex.dart b/lib/src/ast/selector/complex.dart index b2a6b8e2..ac4312ff 100644 --- a/lib/src/ast/selector/complex.dart +++ b/lib/src/ast/selector/complex.dart @@ -16,7 +16,8 @@ import '../selector.dart'; /// A complex selector is composed of [CompoundSelector]s separated by /// [Combinator]s. It selects elements based on their parent selectors. /// -/// {@category Selector} +/// {@category AST} +/// {@category Parsing} @sealed class ComplexSelector extends Selector { /// This selector's leading combinators. diff --git a/lib/src/ast/selector/complex_component.dart b/lib/src/ast/selector/complex_component.dart index f6abe914..61bdd933 100644 --- a/lib/src/ast/selector/complex_component.dart +++ b/lib/src/ast/selector/complex_component.dart @@ -11,7 +11,7 @@ import '../selector.dart'; /// /// This a [CompoundSelector] with one or more trailing [Combinator]s. /// -/// {@category Selector} +/// {@category AST} @sealed class ComplexSelectorComponent { /// This component's compound selector. diff --git a/lib/src/ast/selector/compound.dart b/lib/src/ast/selector/compound.dart index f9c70f34..d4361a46 100644 --- a/lib/src/ast/selector/compound.dart +++ b/lib/src/ast/selector/compound.dart @@ -16,7 +16,8 @@ import '../selector.dart'; /// A compound selector is composed of [SimpleSelector]s. It matches an element /// that matches all of the component simple selectors. /// -/// {@category Selector} +/// {@category AST} +/// {@category Parsing} @sealed class CompoundSelector extends Selector { /// The components of this selector. diff --git a/lib/src/ast/selector/id.dart b/lib/src/ast/selector/id.dart index db1108cd..1045f48a 100644 --- a/lib/src/ast/selector/id.dart +++ b/lib/src/ast/selector/id.dart @@ -13,7 +13,7 @@ import '../selector.dart'; /// /// This selects elements whose `id` attribute exactly matches the given name. /// -/// {@category Selector} +/// {@category AST} @sealed class IDSelector extends SimpleSelector { /// The ID name this selects for. diff --git a/lib/src/ast/selector/list.dart b/lib/src/ast/selector/list.dart index d21a755c..f87a52da 100644 --- a/lib/src/ast/selector/list.dart +++ b/lib/src/ast/selector/list.dart @@ -18,7 +18,8 @@ import '../selector.dart'; /// A selector list is composed of [ComplexSelector]s. It matches any element /// that matches any of the component selectors. /// -/// {@category Selector} +/// {@category AST} +/// {@category Parsing} @sealed class SelectorList extends Selector { /// The components of this selector. diff --git a/lib/src/ast/selector/parent.dart b/lib/src/ast/selector/parent.dart index 01bdb508..461d5e48 100644 --- a/lib/src/ast/selector/parent.dart +++ b/lib/src/ast/selector/parent.dart @@ -12,7 +12,7 @@ import '../selector.dart'; /// This is not a plain CSS selector—it should be removed before emitting a CSS /// document. /// -/// {@category Selector} +/// {@category AST} @sealed class ParentSelector extends SimpleSelector { /// The suffix that will be added to the parent selector after it's been diff --git a/lib/src/ast/selector/placeholder.dart b/lib/src/ast/selector/placeholder.dart index 53be6eef..a7b93532 100644 --- a/lib/src/ast/selector/placeholder.dart +++ b/lib/src/ast/selector/placeholder.dart @@ -14,7 +14,7 @@ import '../selector.dart'; /// `@extend`. It's not a plain CSS selector—it should be removed before /// emitting a CSS document. /// -/// {@category Selector} +/// {@category AST} @sealed class PlaceholderSelector extends SimpleSelector { /// The name of the placeholder. diff --git a/lib/src/ast/selector/pseudo.dart b/lib/src/ast/selector/pseudo.dart index c8f7927b..8d526c1a 100644 --- a/lib/src/ast/selector/pseudo.dart +++ b/lib/src/ast/selector/pseudo.dart @@ -18,7 +18,7 @@ import '../selector.dart'; /// logic for each pseudo selector that takes a selector as an argument, to /// ensure that extension and other selector operations work properly. /// -/// {@category Selector} +/// {@category AST} @sealed class PseudoSelector extends SimpleSelector { /// The name of this selector. diff --git a/lib/src/ast/selector/qualified_name.dart b/lib/src/ast/selector/qualified_name.dart index a995c544..05bb4a08 100644 --- a/lib/src/ast/selector/qualified_name.dart +++ b/lib/src/ast/selector/qualified_name.dart @@ -8,7 +8,7 @@ import 'package:meta/meta.dart'; /// /// [qualified name]: https://www.w3.org/TR/css3-namespace/#css-qnames /// -/// {@category Selector} +/// {@category AST} @sealed class QualifiedName { /// The identifier name. diff --git a/lib/src/ast/selector/simple.dart b/lib/src/ast/selector/simple.dart index fb980ec1..20bfad90 100644 --- a/lib/src/ast/selector/simple.dart +++ b/lib/src/ast/selector/simple.dart @@ -11,7 +11,8 @@ import '../selector.dart'; /// An abstract superclass for simple selectors. /// -/// {@category Selector} +/// {@category AST} +/// {@category Parsing} abstract class SimpleSelector extends Selector { /// The minimum possible specificity that this selector can have. /// diff --git a/lib/src/ast/selector/type.dart b/lib/src/ast/selector/type.dart index 0d9276ce..e587a8b4 100644 --- a/lib/src/ast/selector/type.dart +++ b/lib/src/ast/selector/type.dart @@ -12,7 +12,7 @@ import '../selector.dart'; /// /// This selects elements whose name equals the given name. /// -/// {@category Selector} +/// {@category AST} @sealed class TypeSelector extends SimpleSelector { /// The element name being selected. diff --git a/lib/src/ast/selector/universal.dart b/lib/src/ast/selector/universal.dart index f42cf401..09fe1aad 100644 --- a/lib/src/ast/selector/universal.dart +++ b/lib/src/ast/selector/universal.dart @@ -10,7 +10,7 @@ import '../selector.dart'; /// Matches any element in the given namespace. /// -/// {@category Selector} +/// {@category AST} @sealed class UniversalSelector extends SimpleSelector { /// The selector namespace.