aboutsummaryrefslogtreecommitdiff
path: root/src/prc1/sym.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-10-01 01:04:30 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2026-10-11 00:14:35 +0200
commit4ce39e4fc1de9536de7dedfe91b6dee38dec76ae (patch)
treef9820f96b8eab624430c3700f32a2878a7036ee2 /src/prc1/sym.h
parent9140988be4e5bb028b7140aca1a67af1370c72a7 (diff)
downloadprc-4ce39e4fc1de9536de7dedfe91b6dee38dec76ae.tar.gz
WIP sym + cgen
Diffstat (limited to 'src/prc1/sym.h')
-rw-r--r--src/prc1/sym.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/prc1/sym.h b/src/prc1/sym.h
new file mode 100644
index 0000000..17a54b3
--- /dev/null
+++ b/src/prc1/sym.h
@@ -0,0 +1,15 @@
+#ifndef SYM_H
+#define SYM_H
+
+#include "lex.h"
+#include "prv.h"
+
+typedef int (*sym_fn)(const struct lex *, struct prv *, const struct sym *);
+
+int sym(struct prv *p, sym_fn fn);
+int sym_lval(const struct sym *s);
+int sym_rval(const struct sym *s);
+void sym_free(struct sym *s);
+const struct type *sym_type(struct prv *p, const struct sym *s);
+
+#endif