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