Skip to content

Commit 1972913

Browse files
monicatangfacebook-github-bot
authored andcommitted
augment corpus digraph logic to intake a vec of TextSource
Reviewed By: tyao1 Differential Revision: D52217455 fbshipit-source-id: 7ee4990c8b63c17588d87f6bda1db27d0482a2d0
1 parent 06cb092 commit 1972913

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/crates/common/src/text_source.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ impl TextSource {
7171
Range::new(start_position, end_position)
7272
}
7373

74+
/**
75+
* Converts span, which is the relative indices of characters within this text source,
76+
* into the equivalent line and character number range.
77+
*/
7478
pub fn to_span_range(&self, span: Span) -> lsp_types::Range {
7579
let start = span.start as usize;
7680
let end = span.end as usize;

0 commit comments

Comments
 (0)