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