From d2114c17b9356d010fc907952790f7b6c989e1ba Mon Sep 17 00:00:00 2001 From: c+1 Date: Wed, 3 May 2023 08:25:43 -0400 Subject: token --- src/include/token.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/include/token.h b/src/include/token.h index e69de29..c5ee9ec 100644 --- a/src/include/token.h +++ b/src/include/token.h @@ -0,0 +1,22 @@ +#ifndef TOKEN_H +#define TOKEN_H +typedef struct TOKEN_STRUCT { + enum { + TOKEN_ID, // keyword + TOKEN_EQ, // '=' + TOKEN_STR, // "string" + TOKEN_SEMI, // ';' + TOKEN_LORD, // '/' + TOKEN_RORD, // '\' + TOKEN_AMP, // '&' + TOKEN_LBRAK, // '[' + TOKEN_RBRAK, // ']' + TOKEN_POUND, // '#'' + TOKEN_TILDE // '~' + } type; + + char* value; +} token_T; + +token_T* init_token(int type, char* value); +#endif -- cgit v1.2.3