Error recovery

This commit is contained in:
2026-05-14 23:37:48 +02:00
parent 626990216c
commit 9b04a17fdd
13 changed files with 76 additions and 43 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ pub mod parser;
use ast::*;
use crate::error::ParseResult;
use crate::error::{GetParseError, ParseResult};
#[derive(Parser)]
#[grammar = "./src/grammar.pest"]
@@ -20,7 +20,7 @@ pub fn parse<'a>(source: &'a str) -> ParseResult<'a, Vec<TopLevel>> {
for pair in pairs.next().unwrap().into_inner() {
if pair.as_rule() != Rule::EOI {
statements.push(TopLevel::try_from(pair)?);
statements.push(TopLevel::try_from(pair).get()?);
}
}