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

Method is_float

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

Source from the content-addressed store, hash-verified

743 /// `true` even if the decimal places are 0. e.g. `0.0`.
744 #[inline]
745 pub const fn is_float(&self) -> bool {
746 self.kind_bits() & 0b1100 == 0b0100 && self.third_flag()
747 }
748
749 /// The [Token] is a [Kind::Dimension] or [Kind::Number] and the underlying character data included a `-` or `+`
750 /// character. Note that a positive number may not necessarily have a sign, e.g. `3` will return false, while `+3`

Callers 3

peekMethod · 0.45
parseMethod · 0.45
can_compact_numberMethod · 0.45

Calls 2

kind_bitsMethod · 0.80
third_flagMethod · 0.80

Tested by

no test coverage detected