aboutsummaryrefslogtreecommitdiff
path: root/smash/parser.h
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-14 18:26:49 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-14 18:26:49 +0100
commitd179f1846f9372920ef02f08cfb4d3abe99b383f (patch)
tree4b6ddc71566be95a1ce520ef9d957f4cac1af6c9 /smash/parser.h
first commit
Diffstat (limited to 'smash/parser.h')
-rw-r--r--smash/parser.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/smash/parser.h b/smash/parser.h
new file mode 100644
index 0000000..9c23e0f
--- /dev/null
+++ b/smash/parser.h
@@ -0,0 +1,19 @@
+#ifndef PARSER_H
+#define PARSER_H
+
+#include "../lib/sys/sizes.h"
+
+typedef struct {
+ const char *head;
+ const char **args;
+} expression_t;
+
+typedef struct expression_list_t__ {
+ expression_t expression;
+ struct expression_list_t__ *next;
+} expression_list_t;
+
+expression_list_t *new_expression_from_line(char *line);
+void free_expression(expression_list_t *expression);
+
+#endif