Skip to main content

Module extract

Module extract 

Source
Expand description

Re-exports from fallow-extract.

All parsing/extraction logic has been moved to the fallow-extract crate. This module provides backwards-compatible re-exports so that fallow_core::extract::* paths continue to resolve.

Modules§

astro
Astro component frontmatter extraction.
css
CSS/SCSS file parsing and CSS Module class name extraction.
flags
Feature flag detection via lightweight Oxc AST visitor.
inventory
Function inventory walker for fallow coverage upload-inventory.
mdx
MDX import/export statement extraction.
sfc
Vue/Svelte Single File Component (SFC) script and style extraction.
visitor
Visitor utilities for AST extraction.

Structs§

DynamicImportInfo
A dynamic import() call.
DynamicImportPattern
A dynamic import with a partially resolved pattern.
ExportInfo
An export declaration.
ImportInfo
An import declaration.
MarkupClassScan
The result of scanning one markup source for class references.
MarkupClassToken
A static class token referenced in markup, with the 1-based line it sits on.
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.
TailwindArbitraryUse
One use of a Tailwind arbitrary-value utility, with the 1-based line it appears on.
ThemeScan
Result of scanning a CSS source for Tailwind v4 @theme blocks.
ThemeTokenDef
A Tailwind v4 @theme token definition: the custom-property name WITHOUT the leading -- (e.g. color-brand) and its 1-based line in the source.

Enums§

ExportName
Export identifier.
ImportedName
How a symbol is imported.
MemberKind
The kind of member.
SkippedSecurityCalleeExpressionKind
Syntactic expression shape for a skipped security callee.
SkippedSecurityCalleeReason
Why a sink-shaped callee could not be flattened into a static catalogue path.
VisibilityTag
Visibility tag from JSDoc/TSDoc comments that suppresses unused-export detection.

Functions§

compute_css_analytics
Compute structural CSS analytics for a standard-CSS stylesheet source.
extract_apply_tokens
Extract the utility tokens referenced in @apply directive bodies across a CSS source (comment / string masked). @apply rounded-card font-bold; yields ["rounded-card", "font-bold"]. The leading-! and trailing-! important modifiers and a bare !important token are stripped, so a theme token whose utility is applied only via @apply is credited as used.
extract_astro_frontmatter
Extract frontmatter from an Astro component.
extract_astro_style_regions
Extract Astro <style> block bodies while preserving original byte offsets.
extract_astro_template_regions
Extract Astro template markup regions while preserving original byte offsets.
extract_css_module_exports
Extract class names from a CSS module file as named exports.
extract_mdx_statements
Extract import/export statements from MDX content.
extract_sfc_scripts
Extract all <script> blocks from a Vue/Svelte SFC source string.
extract_sfc_styles
Extract all <style> blocks from a Vue/Svelte SFC source string.
extract_sfc_template_regions
Extract template markup regions from a Vue/Svelte SFC.
is_edit_distance_one
True when a and b differ by exactly one single-character edit (one substitution, insertion, or deletion). Equal strings return false. Runs in O(min(len)) without building a full edit-distance matrix.
is_glimmer_file
Return true for Glimmer source files.
is_sfc_file
Check if a file path is a Vue or Svelte SFC (.vue or .svelte).
is_typo_edit
True when defined is a likely TYPO target for token: exactly one edit apart AND that edit is a believable mistake, not a deliberate naming variation. This is stricter than is_edit_distance_one because real codebases are full of one-edit class pairs that are NOT typos:
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).
scan_markup_class_tokens
Scan a markup source for static class tokens and a dynamic-construction flag.
scan_tailwind_arbitrary_values
Scan markup source for Tailwind arbitrary-value utility tokens, one entry per occurrence. The caller must gate this on the project using Tailwind (the token shape is Tailwind-specific but not exclusive).
scan_theme_blocks
Scan a CSS source for Tailwind v4 @theme blocks, returning the defined design tokens plus the custom properties read via var() inside those blocks.
scoped_unused_classes
Returns class names defined in <style scoped> blocks of an SFC that appear nowhere else in the component (cleanup candidates), sorted. Returns an empty vec when the source has no analyzable scoped block.
sfc_virtual_stylesheet
Build a “virtual stylesheet” from an SFC’s plain-CSS <style> blocks (any scoping). Each block body is placed at its real line in the SFC via blank-line padding, so CSS metric line numbers from compute_css_analytics map straight back onto the SFC. Returns None when the SFC has no plain-CSS <style> block (e.g. only lang="scss" blocks, which the CSS parser cannot read), so callers run the standard .css metric path on Vue/Svelte component styles.
strip_glimmer_templates
Strip Glimmer <template> blocks while preserving byte offsets and line numbers for the JavaScript/TypeScript parser.