print_parser_error/print_parser_error.rs
1use sqparse::{parse, tokenize, Flavor};
2
3fn main() {
4 let source = include_str!("print_parser_error_script.nut");
5 let tokens = tokenize(source, Flavor::SquirrelRespawn).unwrap();
6 let parse_err = parse(&tokens).unwrap_err();
7
8 println!(
9 "{}",
10 parse_err.display(source, &tokens, Some("print_parser_error_script.nut"))
11 );
12}