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

Method peek

crates/css_parse/src/token_macros.rs:424–431  ·  view source on GitHub ↗
(p: &Parser<'a, I>, _: Cursor)

Source from the content-addressed store, hash-verified

422 const PEEK_KINDSET: KindSet = KindSet::new(&[Kind::Whitespace]);
423
424 fn peek<I>(p: &Parser<'a, I>, _: Cursor) -> bool
425 where
426 I: Iterator<Item = Cursor> + Clone,
427 {
428 // Whitespace needs to peek its own cursor because it was likely given one that skipped Whitespace.
429 let c = p.peek_n_with_skip(1, KindSet::COMMENTS);
430 c == Kind::Whitespace
431 }
432}
433
434impl<'a> Parse<'a> for Whitespace {

Callers

nothing calls this directly

Calls 4

peek_n_with_skipMethod · 0.80
is_dashed_identMethod · 0.80
peek_nMethod · 0.80
tokenMethod · 0.45

Tested by

no test coverage detected