MCPcopy Create free account
hub / github.com/Inversive-Labs/eloizer / parse_rust_code

Function parse_rust_code

src/ast/parser.rs:16–19  ·  view source on GitHub ↗

Parse a string of Rust code and return the AST

(content: &str)

Source from the content-addressed store, hash-verified

14
15/// Parse a string of Rust code and return the AST
16pub fn parse_rust_code(content: &str) -> Result<syn::File> {
17 syn::parse_str::<syn::File>(content)
18 .map_err(|e| anyhow::anyhow!("Failed to parse Rust code: {}", e))
19}
20
21/// Process a directory and return a vector of (path, AST) pairs
22pub fn process_directory(dir_path: &Path) -> Vec<(PathBuf, syn::File)> {

Callers 1

parse_rust_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected