fix: added explanation for nested pair error, added more errors

This commit is contained in:
Barf-Vader 2025-02-06 23:08:34 +00:00 committed by Guy C
parent a2c81883f4
commit f24f8c87d8

View File

@ -110,8 +110,9 @@ object parser {
private lazy val `<pair-elem-type>` = private lazy val `<pair-elem-type>` =
(`<base-type>` <**> (`<array-type>` </> identity)) | (`<base-type>` <**> (`<array-type>` </> identity)) |
((UntypedPairType from `<pair-type>`) <**> ((UntypedPairType from `<pair-type>`) <**>
((`<pair-elems-type>` <**> `<array-type>`) ((`<pair-elems-type>` <**> `<array-type>`.explain(
.map(arr => (_: UntypedPairType) => arr) </> identity)) "non-erased pair types cannot be nested"
)).map(arr => (_: UntypedPairType) => arr) </> identity))
// Statements // Statements
private lazy val `<program>` = Program( private lazy val `<program>` = Program(