summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 54f17a5..2a4898d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -35,6 +35,7 @@ fn parse_nexp(path: &PathBuf) -> anyhow::Result<(String, rnix::Root)> {
Ok((content, parse.tree()))
}
+
fn main() {
let args = Args::parse();
@@ -51,13 +52,15 @@ fn main() {
let query = match parse.to_query() {
Err(es) => {
- eprintln!("{}", es.join("\n"));
+ queries::print_query_errors(&args.query, es);
exit(1);
},
Ok(query) => query
};
- // println!("{nexp:#?}");
+ if args.debug {
+ println!("{query:?}");
+ }
if args.batchmode {
batchmode::batchmode(args.path, query, args.debug);
@@ -196,7 +199,7 @@ fn surrounding_noise(node: &rnix::SyntaxNode) -> (NixNodeOrToken, NixNodeOrToken
fn remove_node(node: &rnix::SyntaxNode) -> (usize, usize) {
let (before, after) = surrounding_noise(node);
- let (mut prev, mut next) =
+ let (mut prev, /*mut*/ next) =
eat_whitespace(&before, &after);
// println!("{prev:?}, {next:?}");