Expand description
The full source range of a declaration.
Neither source of truth carries it. The graph records only the identifier — one, three
characters — and the parser’s declaration span stops at the name, covering pub fn one. An
edit that means “replace this function” needs where the body ends, and getting that wrong
writes over whatever follows.
So the end is found by matching the declaration’s opening brace, over the tokenizer rather
than the raw text: a } inside a string literal or a comment is not a closing brace, and
counting characters would treat it as one.
Structs§
- Declaration
Range - A declaration located in one file, in byte offsets.
Functions§
- body_
lines - The 1-based line range the declaration named
nameoccupies, body included. - locate
- Finds the declaration named
namewhose signature begins online.