(p: &mut Parser<'a, I>)
| 47 | |
| 48 | impl<'a> Parse<'a> for CSSInt { |
| 49 | fn parse<I>(p: &mut Parser<'a, I>) -> ParserResult<Self> |
| 50 | where |
| 51 | I: Iterator<Item = Cursor> + Clone, |
| 52 | { |
| 53 | if p.peek::<Self>() { |
| 54 | p.parse::<T![Number]>().map(Self) |
| 55 | } else { |
| 56 | Err(Diagnostic::new(p.next(), Diagnostic::unexpected))? |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | #[cfg(test)] |