7#include <tree_sitter/api.h>
12namespace fs = std::filesystem;
19 static bool is_function_empty(TSNode body);
21 static std::string detect_language(
const fs::path& path);
23 static std::string get_full_signature(TSNode func_node,
const std::string& source);
35 static std::string get_function_name(TSNode func_node,
const std::string& source);
37 static TSNode get_body(TSNode node);
49 static bool should_ignore(TSNode node);
51 static void collect_functions(
52 TSNode node,
const std::string& source,
const fs::path& relative_path,
53 const std::shared_ptr<TSTree>& tree,
57 static std::shared_ptr<TSTree> parse_source(
58 const fs::path& file_path,
const std::string& source_code);
62 const fs::path& file_path,
const fs::path& relative_path,
const std::string& source_code,
67 const fs::path& file_path,
const fs::path& relative_path,
const std::string& source_code,
static void process_file_as_unit(const fs::path &file_path, const fs::path &relative_path, const std::string &source_code, std::function< void(const FunctionData &)> callback, SkipStats &stats)
TreeSitterParser()=default
static void process_file(const fs::path &file_path, const fs::path &relative_path, const std::string &source_code, std::function< void(const FunctionData &)> callback, SkipStats &stats)