Expand description
Rust source file parser built on syn.
Parses .rs files into a structured representation that captures the information
the Detector needs: function boundaries, call sites,
use imports, and extern blocks. Handles free functions, impl block methods,
and trait default methods.
The parser uses syn::visit::Visit to walk the AST. It does not perform type
resolution — all matching is done on syntactic path segments. Import aliases are
tracked so the Detector can expand them.
Structs§
- Call
Site - A single call expression inside a function body.
- Extern
Block - An
externblock declaring foreign functions. - Import
Path - A
useimport statement, with optional alias. - Parsed
File - The parsed representation of a single
.rssource file. - Parsed
Function - A single function (free,
implmethod, or trait default method) and its call sites.
Enums§
- Call
Kind - Distinguishes qualified function calls from method calls.
Functions§
- parse_
file - Parses a
.rsfile from disk into aParsedFile. - parse_
source - Parses Rust source code from a string into a
ParsedFile.