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

Method with_associated_whitespace

crates/css_lexer/src/cursor.rs:82–88  ·  view source on GitHub ↗
(&self, rules: AssociatedWhitespaceRules)

Source from the content-addressed store, hash-verified

80 }
81
82 pub fn with_associated_whitespace(&self, rules: AssociatedWhitespaceRules) -> Self {
83 debug_assert!(self.1 == KindSet::DELIM_LIKE);
84 if self.1.associated_whitespace().to_bits() == rules.to_bits() {
85 return *self;
86 }
87 Self::new(self.offset(), self.token().with_associated_whitespace(rules))
88 }
89
90 /// Returns a new [Cursor] with the `sign_is_required` flag set on the token.
91 /// This indicates that the `+` sign should be preserved during minification.

Callers

nothing calls this directly

Calls 4

associated_whitespaceMethod · 0.80
to_bitsMethod · 0.45
offsetMethod · 0.45
tokenMethod · 0.45

Tested by

no test coverage detected