Skip to main content

extract_file_with_bindings

Function extract_file_with_bindings 

Source
pub fn extract_file_with_bindings(
    lang: Language,
    source: &str,
    file: &str,
    rules: &BindingRules,
) -> Result<FileFacts>
Expand description

Extract facts from a single file, dispatching on its language, applying rules to recognize embedded secondary-artifact constructs (e.g. SQL strings passed to a query-binding function).

Each language arm is compiled only when the corresponding Cargo feature is enabled (e.g. rust, python, typescript, …). Disabled languages return CodegraphError::UnsupportedLanguage at runtime.