1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 12:37:45 +00:00

feat: early abort on error

This commit is contained in:
Kevin Amado 2022-01-28 18:10:54 -05:00
parent 4e873a1fe4
commit a35638f586
No known key found for this signature in database
GPG key ID: FFF341057F503148
3 changed files with 4 additions and 1 deletions

View file

@ -7,7 +7,8 @@ pub fn string(
let ast = rnix::parser::parse(tokens);
for error in ast.errors() {
eprintln!("Warning: parsing error: {}, at: {}", error, path);
eprintln!("Error: {}, at: {}", error, path);
return ast.node().to_string();
}
let green_node =

1
tests/cases/error/in Normal file
View file

@ -0,0 +1 @@
;-)

1
tests/cases/error/out Normal file
View file

@ -0,0 +1 @@
;-)