From efa510e6b58ce13c53e94f13a5be0007240e9dcc Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 9 Jul 2025 04:46:58 +0200 Subject: Display human-readable, informative parser error messages w/ source snippet Signed-off-by: Mel --- boot/common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'boot/common.c') diff --git a/boot/common.c b/boot/common.c index a072f60..1835cd7 100644 --- a/boot/common.c +++ b/boot/common.c @@ -249,6 +249,14 @@ string_array_at(const struct String_Array* array, uint index) struct String str = array.strings[0]; \ for (uint cursor = 0; cursor < array.count; str = array.strings[++cursor]) +// a source file given to the compiler. +struct Source_File +{ + struct String source; + // path to the source file, relative to the current working directory. + struct String path; +}; + // single iteration of the CRC32 checksum algorithm // described in POSIX. // see: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/cksum.html -- cgit 1.4.1