feat(p10-1a-2): add internal SourceSpan::Code variant + design §3.4 sync

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 15:52:01 +00:00
parent 5c265bb59f
commit 9f3edb7e24
4 changed files with 47 additions and 0 deletions

View File

@@ -49,6 +49,13 @@ pub(crate) fn citation_from_first_span(
end_ms: *end_ms,
speaker: None,
},
// TODO(p10-1a-2 Task 3): map to Citation::Code
Some(SourceSpan::Code { .. }) => Citation::Line {
path,
start: 1,
end: 1,
section,
},
// Byte-spans don't have a Citation variant. Fall back to a
// Line citation pointing at the document head — better than
// fabricating a position. Spans-empty falls into the same