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

Method quote_style

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

Source from the content-addressed store, hash-verified

854 /// If the [Token] is not a [Kind::String] this will return [QuoteStyle::None].
855 #[inline]
856 pub fn quote_style(&self) -> QuoteStyle {
857 if self.kind_bits() == Kind::String as u8 {
858 if self.third_flag() {
859 return QuoteStyle::Double;
860 } else {
861 return QuoteStyle::Single;
862 }
863 }
864 QuoteStyle::None
865 }
866
867 /// Returns a new [Token] with the [QuoteStyle] set to the given [QuoteStyle], if possible.
868 ///

Callers 6

fmtMethod · 0.80
fmt_compacted_stringMethod · 0.80
fmt_expanded_stringMethod · 0.80
with_quotesMethod · 0.80
fromMethod · 0.80
eqMethod · 0.80

Calls 2

kind_bitsMethod · 0.80
third_flagMethod · 0.80

Tested by

no test coverage detected