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

Method visit_style_rule

crates/csskit_highlight/src/css.rs:114–119  ·  view source on GitHub ↗

Visit style rules to specifically mark the curlies as Punctuation

(&mut self, rule: &StyleRule<'a>)

Source from the content-addressed store, hash-verified

112
113 // Visit style rules to specifically mark the curlies as Punctuation
114 fn visit_style_rule<'a>(&mut self, rule: &StyleRule<'a>) {
115 self.insert(rule.rule.block.open_curly.to_span(), SemanticKind::Punctuation, SemanticModifier::none());
116 if let Some(close) = rule.rule.block.close_curly {
117 self.insert(close.to_span(), SemanticKind::Punctuation, SemanticModifier::none());
118 }
119 }
120
121 // Visit Declarations to mark the name and colon
122 fn enter_declaration<'a, T: DeclarationValue<'a, CssMetadata>>(

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
to_spanMethod · 0.45

Tested by

no test coverage detected