compiler, cli: Support Nice Compilation Error Messages
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -96,7 +96,8 @@ extension Cli {
|
||||
|
||||
let maybe_program = Program.Compile(source.getSource())
|
||||
guard case .Ok(_) = maybe_program else {
|
||||
print(ErrorWithLabel("Compiler Error", maybe_source.error()!).format(formatter))
|
||||
let feedback = CompilationFeedback(source, [maybe_program.error()!], formatter)
|
||||
print(feedback.feedback)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user