mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Have tint executable use the diagnostic printer
Will now print with better formatting and colors on terminals that support it. Bug: tint:282 Change-Id: Ibff341cb1dc2dcbda6fa0d72e24fdcb172990138 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31570 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
ecea5c8aec
commit
d59a5da9e5
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "tint/tint.h"
|
||||
|
||||
#include "src/diagnostic/printer.h"
|
||||
|
||||
namespace {
|
||||
|
||||
enum class Format {
|
||||
@@ -478,7 +480,8 @@ int main(int argc, const char** argv) {
|
||||
return 1;
|
||||
}
|
||||
if (!reader->Parse()) {
|
||||
std::cerr << "Parse: " << reader->error() << std::endl;
|
||||
auto printer = tint::diag::Printer::create(stderr, true);
|
||||
tint::diag::Formatter().format(reader->diagnostics(), printer.get());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user