diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-17 04:04:11 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-17 04:04:11 +0800 |
| commit | dc9d5ea0026a6cb6bb477d5db8e9190a79ecb337 (patch) | |
| tree | fffa1630946e8299e25f805955cc3baa0479be0d /mingling_pathf/src/pattern_analyzer.rs | |
| parent | b9f208deed7b8e012fbcd84202e2fb1d5eb8eeb9 (diff) | |
docs: add module-level documentation and improve doc comments
Diffstat (limited to 'mingling_pathf/src/pattern_analyzer.rs')
| -rw-r--r-- | mingling_pathf/src/pattern_analyzer.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mingling_pathf/src/pattern_analyzer.rs b/mingling_pathf/src/pattern_analyzer.rs index c4b1971..3765971 100644 --- a/mingling_pathf/src/pattern_analyzer.rs +++ b/mingling_pathf/src/pattern_analyzer.rs @@ -1,3 +1,17 @@ +//! This module defines the core pattern analysis system used to parse and extract +//! importable/referenceable items (like structs, enums, functions, etc.) from Rust source files. +//! +//! It provides a pluggable architecture via the `AnalyzePattern` trait, allowing different +//! syntactic patterns to be registered and applied. Built-in patterns cover common structures +//! such as basic structs, packs, groups, derives, chains, renderers, help, completion, and +//! dispatch patterns (both standard and clap-based). +//! +//! The entry points are: +//! - [`init()`] — creates a default `PatternAnalyzer` with all built-in patterns. +//! - [`init_with_config()`] — creates a `PatternAnalyzer` with a given `PathfinderConfig`. +//! - [`PatternAnalyzer::analyze_file()`] / [`PatternAnalyzer::analyze_file_items()`] — run +//! analysis on a single file. + use std::collections::HashSet; use std::path::Path; |
