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

Method is_bad

crates/css_lexer/src/token.rs:974–976  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

972 /// Checks if the [Token] is [Kind::BadString] or [Kind::BadUrl], or the "bad flag" has been set.
973 #[inline]
974 pub const fn is_bad(&self) -> bool {
975 self.kind_bits() & 0b1_0000 == 0b1_0000
976 }
977
978 /// Returns a new token with the bad/recovery flag set.
979 /// This is used by the parser to mark tokens as problematic during error recovery.

Callers 1

kindMethod · 0.45

Calls 1

kind_bitsMethod · 0.80

Tested by

no test coverage detected