Skip to content

Commit

Permalink
Recategorize selectors as "AST" for Dartdoc (#1752)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nex3 committed Jul 22, 2022
1 parent 3e7c9dd commit 0d4c0d0
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/src/ast/selector.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/attribute.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/class.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/combinator.dart
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/src/ast/selector/complex.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/complex_component.dart
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/ast/selector/compound.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/id.dart
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/ast/selector/list.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/parent.dart
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/placeholder.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/pseudo.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/qualified_name.dart
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/ast/selector/simple.dart
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/type.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/selector/universal.dart
Expand Up @@ -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.
Expand Down

0 comments on commit 0d4c0d0

Please sign in to comment.