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

Method with_sign_required

crates/css_lexer/src/token.rs:773–776  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

771 /// Asserts: the `kind()` is [Kind::Number].
772 #[inline]
773 pub const fn with_sign_required(self) -> Token {
774 debug_assert!(self.kind_bits() == Kind::Number as u8);
775 Token(self.0 | (1 << 31), self.1)
776 }
777
778 /// If the [Token] is a [Kind::Dimension] or [Kind::Number] then this returns the amount of characters used to
779 /// represent this number in the underlying source text. Numbers may be inefficiently encoded in the source text,

Callers 3

parseMethod · 0.45
test_compact_numberFunction · 0.45
preserve_signMethod · 0.45

Calls 1

TokenClass · 0.85

Tested by 1

test_compact_numberFunction · 0.36