MCPcopy Create free account
hub / github.com/csskit/csskit / parse

Method parse

crates/css_ast/src/functions/color_function.rs:54–62  ·  view source on GitHub ↗
(p: &mut Parser<'a, I>)

Source from the content-addressed store, hash-verified

52
53impl<'a> Parse<'a> for CommaOrSlash {
54 fn parse<I>(p: &mut Parser<'a, I>) -> ParserResult<Self>
55 where
56 I: Iterator<Item = Cursor> + Clone,
57 {
58 if !p.peek::<Self>() {
59 Err(Diagnostic::new(p.next(), Diagnostic::unexpected))?
60 }
61 Ok(Self(p.next()))
62 }
63}
64
65/// <https://drafts.csswg.org/css-color/#typedef-color-function>

Callers

nothing calls this directly

Calls 10

ErrClass · 0.85
ColorMixInterface · 0.85
HslClass · 0.85
HwbClass · 0.85
LabClass · 0.85
LchClass · 0.85
OklabClass · 0.85
OklchClass · 0.85
ColorEnum · 0.50
nextMethod · 0.45

Tested by

no test coverage detected