fix: made missing func return type error atomic
This commit is contained in:
parent
731692d95a
commit
c798fdf416
@ -126,7 +126,7 @@ object parser {
|
|||||||
(`<type>`.label("function declaration") <~> `<ident>` <~ "(")
|
(`<type>`.label("function declaration") <~> `<ident>` <~ "(")
|
||||||
) <**> `<partial-func-decl>`
|
) <**> `<partial-func-decl>`
|
||||||
).label("function declaration"),
|
).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"
|
"main program body"
|
||||||
)) <~ "end"
|
)) <~ "end"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user