Skip to content

Commit 96f10dc

Browse files
committed
Correct outdated references from DeclarationListParser to RuleBodyParser in comments
1 parent 7c480cb commit 96f10dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rules_and_declarations.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait DeclarationParser<'i> {
3131
/// Parse the value of a declaration with the given `name`.
3232
///
3333
/// Return the finished representation for the declaration
34-
/// as returned by `DeclarationListParser::next`,
34+
/// as returned by `RuleBodyParser::next`,
3535
/// or an `Err(..)` to ignore the entire declaration as invalid.
3636
///
3737
/// Declaration name matching should be case-insensitive in the ASCII range.
@@ -63,7 +63,7 @@ pub trait DeclarationParser<'i> {
6363
///
6464
/// Default implementations that reject all at-rules are provided,
6565
/// so that `impl AtRuleParser<(), ()> for ... {}` can be used
66-
/// for using `DeclarationListParser` to parse a declarations list with only qualified rules.
66+
/// for using `RuleBodyParser` to parse a declarations list with only qualified rules.
6767
pub trait AtRuleParser<'i> {
6868
/// The intermediate representation of prelude of an at-rule.
6969
type Prelude;
@@ -121,7 +121,7 @@ pub trait AtRuleParser<'i> {
121121
/// The location passed in is source location of the start of the prelude.
122122
///
123123
/// Return the finished representation of the at-rule
124-
/// as returned by `StyleSheetParser::next` or `DeclarationListParser::next`,
124+
/// as returned by `StyleSheetParser::next` or `RuleBodyParser::next`,
125125
/// or an `Err(..)` to ignore the entire at-rule as invalid.
126126
///
127127
/// This is only called when `parse_prelude` returned `WithBlock`, and a block
@@ -197,7 +197,7 @@ pub trait QualifiedRuleParser<'i> {
197197
pub struct RuleBodyParser<'i, 't, 'a, P, I, E> {
198198
/// The input given to the parser.
199199
pub input: &'a mut Parser<'i, 't>,
200-
/// The parser given to `DeclarationListParser::new`
200+
/// The parser given to `RuleBodyParser::new`
201201
pub parser: &'a mut P,
202202

203203
_phantom: std::marker::PhantomData<(I, E)>,
@@ -218,7 +218,7 @@ pub trait RuleBodyItemParser<'i, DeclOrRule, Error: 'i>:
218218
}
219219

220220
impl<'i, 't, 'a, P, I, E> RuleBodyParser<'i, 't, 'a, P, I, E> {
221-
/// Create a new `DeclarationListParser` for the given `input` and `parser`.
221+
/// Create a new `RuleBodyParser` for the given `input` and `parser`.
222222
///
223223
/// Note that all CSS declaration lists can on principle contain at-rules.
224224
/// Even if no such valid at-rule exists (yet),
@@ -230,7 +230,7 @@ impl<'i, 't, 'a, P, I, E> RuleBodyParser<'i, 't, 'a, P, I, E> {
230230
/// since `AtRuleParser` provides default implementations of its methods.
231231
///
232232
/// The return type for finished declarations and at-rules also needs to be the same,
233-
/// since `<DeclarationListParser as Iterator>::next` can return either.
233+
/// since `<RuleBodyParser as Iterator>::next` can return either.
234234
/// It could be a custom enum.
235235
pub fn new(input: &'a mut Parser<'i, 't>, parser: &'a mut P) -> Self {
236236
Self {

0 commit comments

Comments
 (0)