diff options
author | c+1 | 2023-05-03 08:25:43 -0400 |
---|---|---|
committer | c+1 | 2023-05-03 08:25:43 -0400 |
commit | d2114c17b9356d010fc907952790f7b6c989e1ba (patch) | |
tree | 07577bcaf05609a6cafbbac942ad97a088bb1d9f /src | |
parent | ca9cbfe21ae6b213a665627a7b9430b8584c961e (diff) |
token
Diffstat (limited to 'src')
-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 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 |