refactor: improvements to semantic error printing format #14

Merged
gc1523 merged 12 commits from semantic-error-messages into master 2025-02-07 13:38:35 +00:00
3 changed files with 49 additions and 3 deletions
Showing only changes of commit f24f8c87d8 - Show all commits

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(