feat: improve semantic errors #15

Merged
gk1623 merged 5 commits from improve-semantic-errors into master 2025-02-07 15:07:36 +00:00
4 changed files with 42 additions and 24 deletions
Showing only changes of commit 88ddca2b98 - Show all commits

View File

@@ -9,9 +9,11 @@ object types {
case KnownType.Bool => "bool" case KnownType.Bool => "bool"
case KnownType.Char => "char" case KnownType.Char => "char"
case KnownType.String => "string" case KnownType.String => "string"
case KnownType.Array(?) => "array"
case KnownType.Array(elem) => s"$elem[]" case KnownType.Array(elem) => s"$elem[]"
case KnownType.Pair(?, ?) => "pair"
case KnownType.Pair(left, right) => s"pair($left, $right)" case KnownType.Pair(left, right) => s"pair($left, $right)"
case ? => "?" case ? => "<unknown-type>"
} }
} }