fix: use verifiedExplain for missing return type check
This commit is contained in:
parent
0955f19a81
commit
959c556eae
@ -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"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user