diff --git a/src/main/wacc/parser.scala b/src/main/wacc/parser.scala index 8098e84..5403060 100644 --- a/src/main/wacc/parser.scala +++ b/src/main/wacc/parser.scala @@ -119,7 +119,7 @@ object parser { "begin" ~> many( atomic(``.label("function declaration") <~> `` <~ "(") <**> `` ).label("function declaration"), - (atomic(`` <~ "(") ~> fail("function is missing return type") | ``.label( + (atomic(`` <~ "(").verifiedExplain("function is missing return type") | ``.label( "main program body" )) <~ "end" )