MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / span

Function span

atomic-semantic/src/source.rs:267–277  ·  view source on GitHub ↗
(node: Node<'_>, path: &str)

Source from the content-addressed store, hash-verified

265}
266
267fn span(node: Node<'_>, path: &str) -> SourceSpan {
268 SourceSpan {
269 path: path.into(),
270 start_line: node.start_position().row as u32 + 1,
271 end_line: (node.end_position().row
272 + usize::from(
273 node.end_position().column > 0
274 || node.end_position().row == node.start_position().row,
275 )) as u32,
276 }
277}
278
279fn tokens(
280 root: Node<'_>,

Callers 1

from_treeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected