compiler, cli: Support Nice Compilation Error Messages

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-05-22 02:37:33 -04:00
parent 5845cb75cc
commit e53c32f802
9 changed files with 115 additions and 4 deletions
+4
View File
@@ -72,6 +72,7 @@ public protocol ProgramExecutionEvaluator {
public protocol Errorable: CustomStringConvertible {
func format(_ formatter: Formattable) -> String
func format(_ formatter: Formattable, _ sc: SourceCode) -> String
func msg() -> String
func append(error: any Errorable) -> any Errorable
func eq(_ rhs: any Errorable) -> Bool
@@ -81,6 +82,9 @@ extension Errorable {
public func eq(_ rhs: any Errorable) -> Bool {
return self.msg() == rhs.msg()
}
public func format(_ formatter: Formattable, _ sc: SourceCode) -> String {
return self.format(formatter)
}
}
public protocol Formattable {