From d179f1846f9372920ef02f08cfb4d3abe99b383f Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 14 Dec 2022 18:26:49 +0100 Subject: first commit --- smash/parser.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 smash/parser.h (limited to 'smash/parser.h') 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 -- cgit v1.2.3-70-g09d2