On Mon, 2025-02-03 at 11:24 +0100, Mark Wielaard wrote: > Hi Tuur, > > On Mon, Feb 03, 2025 at 09:46:37AM +0000, JohnyTheCarrot via Gcc > wrote: > > I'm in the process of writing my own C compiler for educational > > purposes. > > To this end, I have decided to integrate into my compiler my own > > C++ > > port ( https://github.com/johnythecarrot/mjolnir ) of the Rust > > crate > > Ariadne ( https://github.com/zesterer/ariadne ) which provides > > nice, > > fancy and readable diagnostics for use in compilers and the > > like. See the first link for an idea of how my library outputs > > diagnostics. > > Looks nice.
Very much agreed. > Note that the current diagnostics library GCC uses is > described here: https://gcc.gnu.org/wiki/libgdiagnostics > https://gcc.gnu.org/cgit/gcc/tree/gcc/libgdiagnostics.h > https://gcc.gnu.org/onlinedocs/libgdiagnostics/ To nitpick: GCC doesn't actually *use* libgdiagnostics: both GCC and libgdiagnostics use the same underlying code; libgdiagnostics is a way of exposing that functionality to 3rd-party code. libgdiagnostics presents a cleaned up, opaque, C API to the world, which is similar to but *not* the rather messy C++ API used by GCC and libgdiagnostics internally (though I hope to clean this up and gradually harmonize all this, without breaking anything... [famous last words]) Dave