Expand description
AST pattern search.
Parses user-provided function signature patterns (e.g., “fn(string) -> number”)
and matches them against indexed CodeChunk signatures.
Supports wildcards (*), optional keywords (async, pub), and fuzzy type matching.
§Pattern Syntax
[async] [pub] fn_keyword([param_type, ...]) [-> return_type]Examples:
fn(string) -> number— any function taking a string, returning a numberfn(*) -> Result— any function returning a Resultasync fn(*)— any async functionfn(*, *) -> bool— any function with 2 params returning boolfn authenticate(*)— function named “authenticate” with any paramsclass User— class named Userstruct *Config— struct whose name ends with “Config”
Structs§
- AstMatch
- Result of an AST pattern match.
- AstPattern
- A parsed AST search pattern.
Enums§
- Pattern
Kind - The kind of pattern target.
Functions§
- parse_
pattern - Parse a user-provided AST pattern string.
- search_
ast_ pattern - Search chunks in the index using an AST pattern.