summaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c
new file mode 100644
index 0000000..a4e5080
--- /dev/null
+++ b/src/state.c
@@ -0,0 +1,20 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "state.h"
+
+
+void ccmmc_state_init (CcmmcState *state)
+{
+ state->ast = NULL;
+ state->line_number = 1;
+ state->any_error = false;
+}
+
+void ccmmc_state_fini (CcmmcState *state)
+{
+ if (state->ast != NULL) {
+ // TODO: Free the AST
+ }
+}