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

Method fmt_expanded

crates/css_lexer/src/source_cursor.rs:378–391  ·  view source on GitHub ↗
(&self, f: &mut Formatter<'_>)

Source from the content-addressed store, hash-verified

376
377 #[cfg(feature = "egg")]
378 fn fmt_expanded(&self, f: &mut Formatter<'_>) -> Result {
379 let token = self.token();
380 match token.kind() {
381 Kind::Whitespace => f.write_str(" "),
382 Kind::Ident | Kind::Function | Kind::AtKeyword | Kind::Hash => self.fmt_expanded_ident(f),
383 Kind::Number => self.fmt_expanded_number(f),
384 Kind::Dimension => {
385 self.fmt_expanded_number(f)?;
386 self.fmt_expanded_ident(f)
387 }
388 Kind::Url => self.fmt_expanded_url(f),
389 _ => f.write_str(self.source),
390 }
391 }
392
393 #[cfg(feature = "egg")]
394 fn fmt_expanded_number(&self, f: &mut Formatter<'_>) -> Result {

Callers 1

fmtMethod · 0.80

Calls 6

write_strMethod · 0.80
fmt_expanded_identMethod · 0.80
fmt_expanded_numberMethod · 0.80
fmt_expanded_urlMethod · 0.80
tokenMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected