MCPcopy Create free account
hub / github.com/csskit/csskit / peek

Method peek

crates/css_parse/src/syntax/bang_important.rs:34–44  ·  view source on GitHub ↗
(p: &Parser<'a, Iter>, c: Cursor)

Source from the content-addressed store, hash-verified

32
33 #[inline(always)]
34 fn peek<Iter>(p: &Parser<'a, Iter>, c: Cursor) -> bool
35 where
36 Iter: Iterator<Item = Cursor> + Clone,
37 {
38 if c == Kind::Delim && c == '!' {
39 let c = p.peek_n(2);
40 c == Kind::Ident && p.to_source_cursor(c).eq_ignore_ascii_case("important")
41 } else {
42 false
43 }
44 }
45}
46
47impl<'a> Parse<'a> for BangImportant {

Callers

nothing calls this directly

Calls 3

peek_nMethod · 0.80
eq_ignore_ascii_caseMethod · 0.80
to_source_cursorMethod · 0.45

Tested by

no test coverage detected