Skip to main content

Crate normalize_facts

Crate normalize_facts 

Source
Expand description

Code fact extraction and storage library.

This crate provides:

  • Core fact types (symbols, imports, exports)
  • Parser utilities for tree-sitter grammars
  • Symbol extraction and flattening (SymbolParser)
  • Fact storage (FileIndex)
  • Trait definitions for fact extraction

Re-exports§

pub use extract::ExtractOptions;
pub use extract::ExtractResult;
pub use extract::Extractor;
pub use extract::InterfaceResolver;
pub use extract::OnDemandResolver;

Modules§

extract
Shared symbol extraction from source code.

Structs§

CallGraphStats
Call graph statistics
ChangedFiles
Files that changed since last index
Export
An export declaration
FileIndex
FlatImport
A flattened import for indexing (one entry per imported name)
FlatSymbol
A flattened symbol for indexing (parent reference instead of nested children)
Import
An import statement
IndexedFile
Metadata about an indexed file
MissingGrammar
Summary entry returned by take_missing_grammars.
Symbol
A code symbol extracted from source
SymbolMatch
Result from symbol search
SymbolParser

Enums§

SymbolKind
Symbol kind classification
Visibility
Symbol visibility

Functions§

available_external_grammars
List grammars available in external search paths.
grammar_loader
Get the global grammar loader singleton (canonical instance from normalize-languages).
parse_with_grammar
Parse source code with a specific grammar.
parser_for
Create a parser for a specific grammar.
peek_missing_grammars
Peek at the missing-grammar tracker without resetting it.
report_missing_grammar
Record a grammar load failure and emit a one-shot stderr warning.
take_missing_grammars
Drain and return the missing-grammar tracker.
try_get_grammar
Try to load a grammar, surfacing missing-grammar failures as a one-shot stderr warning. Returns None on any load failure (caller can short-circuit like ?).