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

Method parse

crates/css_ast/src/units/custom.rs:27–36  ·  view source on GitHub ↗
(p: &mut Parser<'a, I>)

Source from the content-addressed store, hash-verified

25
26impl<'a> Parse<'a> for CustomDimension {
27 fn parse<I>(p: &mut Parser<'a, I>) -> ParserResult<Self>
28 where
29 I: Iterator<Item = Cursor> + Clone,
30 {
31 if p.peek::<Self>() {
32 p.parse::<T![Dimension]>().map(Self)
33 } else {
34 Err(Diagnostic::new(p.next(), Diagnostic::unexpected))?
35 }
36 }
37}
38
39#[cfg(test)]

Callers

nothing calls this directly

Calls 2

ErrClass · 0.85
nextMethod · 0.45

Tested by

no test coverage detected