From 64feef1b9ea72adf7ba32998e9dca7d507607498 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Mon, 2 Jan 2023 22:31:49 -0800 Subject: a lot of stuff. --- src/include/token.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/include/token.h (limited to 'src/include/token.h') diff --git a/src/include/token.h b/src/include/token.h new file mode 100644 index 0000000..83c595b --- /dev/null +++ b/src/include/token.h @@ -0,0 +1,22 @@ +#ifndef TOKEN_H +#define TOKEN_H + +typedef struct { + enum { + TOKEN_ID, + TOKEN_LPAREN, + TOKEN_RPAREN, + TOKEN_BOOL, + TOKEN_INT, + TOKEN_FLOAT, + TOKEN_STRING, + TOKEN_QUOTE, + TOKEN_PERIOD, + } type; + char *value; + int row; + int col; +} token_t; + +token_t *init_token(int type, char *value, int row, int col); +#endif -- cgit