From 3c0819236e4f07c8f57aaf1ca46d0d68aa761558 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 5 Sep 2026 17:14:53 +0200 Subject: Move source to src/prc1 --- src/prc1/print.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/prc1/print.h (limited to 'src/prc1/print.h') diff --git a/src/prc1/print.h b/src/prc1/print.h new file mode 100644 index 0000000..950e0bc --- /dev/null +++ b/src/prc1/print.h @@ -0,0 +1,26 @@ +#ifndef PRINT_H +#define PRINT_H + +#include "cgen.h" +#include "lex.h" +#include + +struct prientry +{ + const struct tk *tk; + const struct lit *lit; + const struct stentry *entry; +}; + +struct print +{ + struct prientry *entries; + size_t nentries; + int println; +}; + +int print(const struct lex *l, struct prv *p, + int (*fn)(const struct lex *, const struct prv *, const struct print *)); +void print_free(struct print *p); + +#endif -- cgit v1.2.3