lang: improve and simplify error handling and storage

fixes wrong error ordering with errors using `forward_parents`.
This commit is contained in:
Schrottkatze 2024-06-03 10:53:59 +02:00
parent ed151c2e3c
commit f6da90a354
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
8 changed files with 110 additions and 42 deletions

View file

@ -21,7 +21,7 @@ pub fn vec_matrix_list(p: &mut Parser) -> CompletedMarker {
start.complete(p, LIST)
} else {
row_start.abandon(p);
start.complete_err(p, SyntaxError::Expected(vec![EXPR, R_BRACK]))
start.error(p, SyntaxError::Expected(vec![EXPR, R_BRACK]))
}
}