Fix combinatorial explosion on backtracking broken if chains
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
b0620a00d5
commit
3f549690c1
3 changed files with 9 additions and 3 deletions
BIN
tests/checks/long.nomo
Normal file
BIN
tests/checks/long.nomo
Normal file
Binary file not shown.
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue