fix: made missing func return type error atomic

This commit is contained in:
Barf-Vader 2025-02-07 13:00:28 +00:00
parent 731692d95a
commit c798fdf416

View File

@ -126,7 +126,7 @@ object parser {
(`<type>`.label("function declaration") <~> `<ident>` <~ "(")
) <**> `<partial-func-decl>`
).label("function declaration"),
((`<ident>` <~ "(") *> fail("function is missing return type") | `<stmt>`.label(
(atomic(`<ident>` <~ "(") ~> fail("function is missing return type") | `<stmt>`.label(
"main program body"
)) <~ "end"
)