Skip to main content

parse_project

Function parse_project 

Source
pub fn parse_project(
    compile_commands: &Path,
    base_dir: &Path,
    parallel: bool,
    allow_system: bool,
) -> Result<Vec<(String, Vec<RawNode>)>, IcbError>
Expand description

Parse every source file listed in a compilation database.

Each entry is processed independently; results are collected in the order they complete.

§Arguments

  • compile_commands – Path to compile_commands.json.
  • base_dir – Base directory for resolving relative file paths.
  • parallel – Distribute work across threads if true.
  • allow_system – Forwarded to parse_cpp_file.

§Errors

Returns IcbError::Io if the database cannot be read, or IcbError::Parse for the first file that fails.