From 238dabec513eac8af699756281d5aec12720686c Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 16 Apr 2024 18:51:24 +0200 Subject: 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 --- src/batchmode.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/batchmode.rs') 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, query: Parse, debug: bool) { +pub fn batchmode(tasks: Vec, query: Query, debug: bool) { - fn do_task(path: PathBuf, query: Parse, debug: bool) -> anyhow::Result<(PathBuf, Option)> { + fn do_task(path: PathBuf, query: Query, debug: bool) -> anyhow::Result<(PathBuf, Option)> { let (content, nexp) = match parse_nexp(&path) { Err(e) => { -- cgit v1.2.3