(sr: &SourceRange)
| 160 | } |
| 161 | |
| 162 | pub fn get_source_code_range(sr: &SourceRange) -> Result<(usize, usize)> { |
| 163 | let begin = get_sr_begin_loc(sr)?; |
| 164 | let end = get_sr_end_loc(sr)?; |
| 165 | let begin_loc = begin.offset; |
| 166 | let end_loc = end.offset + end.tok_len; |
| 167 | Ok((begin_loc, end_loc)) |
| 168 | } |
| 169 | |
| 170 | pub fn get_header_code_range(sr: &SourceRange) -> Result<(usize, usize)> { |
| 171 | let begin = sr.begin.spelling_loc.as_ref().unwrap(); |
no test coverage detected