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

Function get_header_code_range

src/ast/loc.rs:170–176  ·  view source on GitHub ↗
(sr: &SourceRange)

Source from the content-addressed store, hash-verified

168}
169
170pub fn get_header_code_range(sr: &SourceRange) -> Result<(usize, usize)> {
171 let begin = sr.begin.spelling_loc.as_ref().unwrap();
172 let end = sr.end.spelling_loc.as_ref().unwrap();
173 let begin_loc = begin.offset;
174 let end_loc = end.offset + end.tok_len;
175 Ok((begin_loc, end_loc))
176}
177
178pub fn get_source_code_content(sr: &SourceRange) -> Result<String> {
179 if let Some(loc) = &sr.begin.spelling_loc {

Callers 1

get_header_code_contentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected