(p: &mut Parser<'a, I>)
| 36 | |
| 37 | impl<'a> Parse<'a> for CSSFloat { |
| 38 | fn parse<I>(p: &mut Parser<'a, I>) -> ParserResult<Self> |
| 39 | where |
| 40 | I: Iterator<Item = Cursor> + Clone, |
| 41 | { |
| 42 | if p.peek::<Self>() { |
| 43 | p.parse::<T![Number]>().map(Self) |
| 44 | } else { |
| 45 | Err(Diagnostic::new(p.next(), Diagnostic::unexpected))? |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | #[cfg(test)] |