refactor: improvements to semantic error printing format #14

Merged
gc1523 merged 12 commits from semantic-error-messages into master 2025-02-07 13:38:35 +00:00
5 changed files with 84 additions and 15 deletions
Showing only changes of commit c798fdf416 - Show all commits

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"
)