aboutsummaryrefslogtreecommitdiff
path: root/inc/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parse.h')
-rw-r--r--inc/parse.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/inc/parse.h b/inc/parse.h
new file mode 100644
index 0000000..c8cafed
--- /dev/null
+++ b/inc/parse.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2023, Marvin Borner <dev@marvinborner.de>
+// SPDX-License-Identifier: MIT
+
+#ifndef BLOC_PARSE_H
+#define BLOC_PARSE_H
+
+#include <stddef.h>
+
+#include <term.h>
+#include <spec.h>
+
+struct bloc_parsed {
+ size_t length;
+ struct term **entries;
+ struct term *term;
+};
+
+struct term *parse_blc(const char *term);
+struct bloc_parsed *parse_bloc(const void *bloc);
+struct term *from_bloc(struct bloc_parsed *bloc);
+
+#endif