MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_sr_offset

Function get_sr_offset

src/ast/loc.rs:46–51  ·  view source on GitHub ↗

Get the source file offsets of this range.

(sr: &SourceRange)

Source from the content-addressed store, hash-verified

44
45/// Get the source file offsets of this range.
46pub fn get_sr_offset(sr: &SourceRange) -> Result<(usize, usize)> {
47 let begin = get_sr_begin_loc(sr)?.offset;
48 let end = get_sr_end_loc(sr)?;
49 let end = end.offset + end.tok_len;
50 Ok((begin, end))
51}
52
53/// Get the beginning offset of the previous one VarDecl;
54fn get_pre_vd_begin(vd_begin: &BareSourceLocation, src_file: &Path) -> Result<usize> {

Callers 2

handle_nested_callMethod · 0.85

Calls 2

get_sr_begin_locFunction · 0.85
get_sr_end_locFunction · 0.85

Tested by

no test coverage detected