compiler, runtime: Support Formatted Error Messages
Make it possible to output formatted error messages using a flexible API that includes an ability to specify styles and formatters. Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -42,7 +42,7 @@ import TreeSitterP4
|
||||
guard case Result.Error(let e) = err else {
|
||||
assert(false, "Expected an error, but had success")
|
||||
}
|
||||
#expect(e.format().contains("Failed to parse a statement element: Could not parse a P4 type from \(invalid_type_name)"))
|
||||
#expect(e.msg().contains("Failed to parse a statement element: Could not parse a P4 type from \(invalid_type_name)"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user