Fix combinatorial explosion on backtracking broken if chains

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-09 16:21:23 +01:00
parent b0620a00d5
commit 3f549690c1
3 changed files with 9 additions and 3 deletions

View file

@ -31,7 +31,13 @@ fn check_cases() {
insta::assert_debug_snapshot!("1-parsed", parsed);
let ast = nomo::ast::parse(parsed.tokens()).unwrap();
let ast = match nomo::ast::parse(parsed.tokens()) {
Ok(ast) => ast,
Err(err) => {
eprintln!("{}", err.to_report(input));
panic!("Could not evaluate ast");
}
};
insta::assert_debug_snapshot!("2-ast", ast);