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

Method atom_bits

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

Source from the content-addressed store, hash-verified

927
928 #[inline]
929 pub fn atom_bits(&self) -> u32 {
930 if self.kind_bits() & 0b1111 == Kind::Dimension as u8 && self.first_flag() {
931 self.0 & 0b111_1111
932 } else if self.is_ident_like() && self.kind_bits() & 0b1111 != Kind::Hash as u8 {
933 self.0 & LENGTH_MASK
934 } else {
935 0
936 }
937 }
938
939 /// Checks if the [Token] is Trivia-like, that is [Kind::Comment], [Kind::Whitespace], [Kind::Eof]
940 #[inline]

Callers 15

declaration_metadataMethod · 0.45
to_atomMethod · 0.45
extract_rule_dataMethod · 0.45
newMethod · 0.45
evaluate_if_featureMethod · 0.45
parseMethod · 0.45
node_idMethod · 0.45
property_kindMethod · 0.45
self_metadataMethod · 0.45
property_groupMethod · 0.45
vendor_prefixMethod · 0.45

Calls 3

kind_bitsMethod · 0.80
first_flagMethod · 0.80
is_ident_likeMethod · 0.80

Tested by

no test coverage detected