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

Method needs_separator

crates/css_parse/src/cursor_compact_write_sink.rs:33–35  ·  view source on GitHub ↗

Would emitting `next` immediately after `last_token` change tokenisation?

(&self, next: Token)

Source from the content-addressed store, hash-verified

31
32 /// Would emitting `next` immediately after `last_token` change tokenisation?
33 fn needs_separator(&self, next: Token) -> bool {
34 self.last_token.is_some_and(|t| t.needs_separator_for(next))
35 }
36
37 /// True when the previously-emitted token never needs a separator after it
38 /// (e.g. `,`, `)`, `{`). Whitespace can be dropped and re-injection skipped.

Callers 1

writeMethod · 0.80

Calls 1

needs_separator_forMethod · 0.80

Tested by

no test coverage detected