(p: &mut Parser<'a, Iter>)
| 46 | |
| 47 | impl<'a> Parse<'a> for BangImportant { |
| 48 | fn parse<Iter>(p: &mut Parser<'a, Iter>) -> Result<Self> |
| 49 | where |
| 50 | Iter: Iterator<Item = Cursor> + Clone, |
| 51 | { |
| 52 | let bang = p.parse::<T![!]>()?; |
| 53 | let important = p.parse::<T![Ident]>()?; |
| 54 | if !p.to_source_cursor(important.into()).eq_ignore_ascii_case("important") { |
| 55 | Err(Diagnostic::new(important.into(), Diagnostic::unexpected_ident))? |
| 56 | } |
| 57 | Ok(Self { bang, important }) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | impl ToCursors for BangImportant { |
nothing calls this directly
no test coverage detected