diff options
author | c+1 | 2023-05-11 14:59:44 -0400 |
---|---|---|
committer | c+1 | 2023-05-11 14:59:44 -0400 |
commit | 5d17d0206593a2c1f9b702991abf42a8848a2d7f (patch) | |
tree | 8bd1f14f467a7f76a35f01b0b8cfd75c72b4532c /src/include | |
parent | 83b1e6e7dba766c42a713dd93fcaff07abbdf272 (diff) |
HACK THE HALK
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/lexer.h | 8 | ||||
-rw-r--r-- | src/include/token.h | 28 |
2 files changed, 21 insertions, 15 deletions
diff --git a/src/include/lexer.h b/src/include/lexer.h index eb80646..bff0a80 100644 --- a/src/include/lexer.h +++ b/src/include/lexer.h @@ -20,9 +20,15 @@ extern token_t* lexer_get_next_token(lexer_t* lexer); extern token_t* lexer_get_string(lexer_t* lexer); +extern token_t* lexer_get_def_const(lexer_t* lexer); + +extern token_t* lexer_get_def_mut(lexer_t* lexer); + extern token_t* lexer_get_comment(lexer_t* lexer); -extern token_t* lexer_get_id(lexer_t* lexer); +extern token_t* lexer_get_directive(lexer_t* lexer); + +extern token_t* lexer_get_keyword(lexer_t* lexer); extern token_t* lexer_next_token(lexer_t* lexer, token_t* token); diff --git a/src/include/token.h b/src/include/token.h index 147862c..4ca8356 100644 --- a/src/include/token.h +++ b/src/include/token.h @@ -4,20 +4,20 @@ typedef struct TOKEN_STRUC { 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, // '~' - TOKEN_QUOTE, // ''' - TOKEN_COMM, // '[comment]' - TOKEN_EOF // '\0' + TOKEN_KEYWORD, // keyword + TOKEN_STR_DELIM, // '"' + TOKEN_STR, // "string" + TOKEN_COMM_DELIM_START, // '[' + TOKEN_COMM, // '[comment]' + TOKEN_COMM_DELIM_END, // ']' + TOKEN_DEFINE_CONST, // '=>' + TOKEN_DEFINE_MUT, // '->' + TOKEN_END, // ';' + TOKEN_LORD, // '(' + TOKEN_RORD, // ')' + TOKEN_DIRECTIVE_DELIM, // '#' + TOKEN_DIRECTIVE, // #DIRECTIVE; + TOKEN_EOF, // '\0' } type; char* value; |