Skip to main content

Crate fallow_extract

Crate fallow_extract 

Source
Expand description

Parsing and extraction engine for the fallow codebase analyzer.

This crate handles all file parsing: JS/TS via Oxc, Vue/Svelte SFC extraction, Astro frontmatter, MDX import/export extraction, CSS Module class name extraction, HTML asset reference extraction, and incremental caching of parse results.

Re-exports§

pub use astro::extract_astro_frontmatter;
pub use css::extract_css_module_exports;
pub use mdx::extract_mdx_statements;
pub use sfc::extract_sfc_scripts;
pub use sfc::is_sfc_file;

Modules§

astro
Astro component frontmatter extraction.
cache
Incremental parse cache with bitcode serialization.
css
CSS/SCSS file parsing and CSS Module class name extraction.
html
HTML file parsing for script, stylesheet, and Angular template references.
mdx
MDX import/export statement extraction.
sfc
Vue/Svelte Single File Component (SFC) script extraction.
suppress
Inline suppression comment parsing.
visitor
Oxc AST visitor for extracting imports, exports, re-exports, and member accesses.

Structs§

DynamicImportInfo
A dynamic import() call.
DynamicImportPattern
A dynamic import with a pattern that can be partially resolved (e.g., template literals).
ExportInfo
An export declaration.
ImportInfo
An import declaration.
MemberAccess
A static member access expression (e.g., Status.Active, MyClass.create()).
MemberInfo
A member of an enum, class, or namespace.
ModuleInfo
Extracted module information from a single file.
ParseResult
Result of parsing all files, including incremental cache statistics.
ReExportInfo
A re-export declaration.
RequireCallInfo
A require() call.

Enums§

ExportName
Export identifier.
ImportedName
How a symbol is imported.
MemberKind
The kind of member.

Constants§

ANGULAR_TPL_SENTINEL
Sentinel value used as the object field in MemberAccess entries produced by the Angular template scanner. The analysis phase checks imports for entries with this sentinel and merges them into the component’s self_accessed_members set.

Functions§

compute_line_offsets
Compute a table of line-start byte offsets from source text.
parse_all_files
Parse all files in parallel, extracting imports and exports. Uses the cache to skip reparsing files whose content hasn’t changed.
parse_from_content
Parse from in-memory content (for LSP, includes complexity).
parse_single_file
Parse a single file and extract module information (without complexity).