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

Method is_int

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

Source from the content-addressed store, hash-verified

736 /// The [Token] is a [Kind::Dimension] or [Kind::Number] and is an integer - i.e. it has no `.`.
737 #[inline]
738 pub const fn is_int(&self) -> bool {
739 self.kind_bits() & 0b1110 == 0b0100 && !self.third_flag()
740 }
741
742 /// The [Token] is a [Kind::Dimension] or [Kind::Number] and is a float - i.e. it has decimal places. This will be
743 /// `true` even if the decimal places are 0. e.g. `0.0`.

Callers 5

peekMethod · 0.45
parseMethod · 0.45
can_compact_numberMethod · 0.45
fmt_expanded_numberMethod · 0.45
convert_tokenFunction · 0.45

Calls 2

kind_bitsMethod · 0.80
third_flagMethod · 0.80

Tested by 1

convert_tokenFunction · 0.36