diff options
author | stuebinm | 2024-04-16 18:51:24 +0200 |
---|---|---|
committer | stuebinm | 2024-04-16 18:51:24 +0200 |
commit | 238dabec513eac8af699756281d5aec12720686c (patch) | |
tree | 91db54c21027c96d73add8e4702327ac1a812293 /src/batchmode.rs | |
parent | a0459645638fe1397aa4f5e01a8f9093911ccf6c (diff) |
add an actual AST for the query language
this incidentally also moves a lot of the parsing logic out of
piplines.rs and instead keeps it in queries.rs, where it should probably
be anyways, so the pipeline module can focus on just … well, applying
the filter pipeline
Diffstat (limited to 'src/batchmode.rs')
-rw-r--r-- | src/batchmode.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/batchmode.rs b/src/batchmode.rs index 84b0dff..3e83694 100644 --- a/src/batchmode.rs +++ b/src/batchmode.rs @@ -2,13 +2,13 @@ use std::{path::PathBuf, fs, sync::{Arc, Mutex}}; use rowan::ast::AstNode; use threadpool::ThreadPool; -use crate::{status_reporter::*, queries::{SyntaxNode, Parse}, parse_nexp, apply_changes}; +use crate::{status_reporter::*, queries::Query, parse_nexp, apply_changes}; #[allow(unreachable_code, unused)] -pub fn batchmode(tasks: Vec<PathBuf>, query: Parse, debug: bool) { +pub fn batchmode(tasks: Vec<PathBuf>, query: Query, debug: bool) { - fn do_task(path: PathBuf, query: Parse, debug: bool) -> anyhow::Result<(PathBuf, Option<String>)> { + fn do_task(path: PathBuf, query: Query, debug: bool) -> anyhow::Result<(PathBuf, Option<String>)> { let (content, nexp) = match parse_nexp(&path) { Err(e) => { |