Skip to main content

run_astgrep_query

Function run_astgrep_query 

Source
pub fn run_astgrep_query(
    file: &Path,
    content: &str,
    pattern_str: &str,
    grammar: &Language,
    grammar_name: &str,
) -> Result<Vec<MatchResult>, String>
Expand description

Run an ast-grep pattern query against a single file’s content.