(p: &mut Parser<'a, I>)
| 52 | |
| 53 | impl<'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> |