From 87f7c5c5d88039910ae09fd26e52304683fadf50 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 10 Feb 2024 15:36:35 -0500 Subject: Print input source --- nextlang.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nextlang.c b/nextlang.c index 7b56d0a6..5cedfde9 100644 --- a/nextlang.c +++ b/nextlang.c @@ -31,6 +31,12 @@ int main(int argc, char *argv[]) if (!ast) errx(1, "Could not compile!"); + if (getenv("VERBOSE")) { + FILE *out = popen(heap_strf("bat --file-name='%s'", argv[1]), "w"); + fputs(f->text, out); + fclose(out); + } + if (getenv("VERBOSE")) { FILE *out = popen("bat --file-name=AST", "w"); fputs(ast_to_str(ast), out); -- cgit v1.2.3