MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / get_snippet

Method get_snippet

src/backward.h:3870–3876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3868 typedef SourceFile::lines_t lines_t;
3869
3870 lines_t get_snippet(const std::string& filename, unsigned line_start, unsigned context_size)
3871 {
3872
3873 SourceFile& src_file = get_src_file(filename);
3874 unsigned start = line_start - context_size / 2;
3875 return src_file.get_lines(start, context_size);
3876 }
3877
3878 lines_t get_combined_snippet(
3879 const std::string& filename_a,

Callers 1

print_snippetMethod · 0.80

Calls 1

get_linesMethod · 0.80

Tested by

no test coverage detected