fix: use verifiedExplain for missing return type check
This commit is contained in:
@@ -119,7 +119,7 @@ object parser {
|
||||
"begin" ~> many(
|
||||
atomic(`<type>`.label("function declaration") <~> `<ident>` <~ "(") <**> `<partial-func-decl>`
|
||||
).label("function declaration"),
|
||||
(atomic(`<ident>` <~ "(") ~> fail("function is missing return type") | `<stmt>`.label(
|
||||
(atomic(`<ident>` <~ "(").verifiedExplain("function is missing return type") | `<stmt>`.label(
|
||||
"main program body"
|
||||
)) <~ "end"
|
||||
)
|
||||
|
Reference in New Issue
Block a user