diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-02 22:31:49 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-02 22:31:49 -0800 |
commit | 64feef1b9ea72adf7ba32998e9dca7d507607498 (patch) | |
tree | a409e61877bb51aa6fb2477175dabbf3dbccf298 /src/include/token.h |
a lot of stuff.
Diffstat (limited to 'src/include/token.h')
-rw-r--r-- | src/include/token.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 |