diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/lexer.h | 20 | ||||
-rw-r--r-- | src/include/main.h | 0 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/include/lexer.h b/src/include/lexer.h index e69de29..a20bf8c 100644 --- a/src/include/lexer.h +++ b/src/include/lexer.h @@ -0,0 +1,20 @@ +#ifndef LEXER_H +#define LEXER_H +#include "token.h" + +typedef struct LEXER_STRUC { + char c; // current character in content + unsigned int i; // index of c + char* content; // the code itself +} lexer_T; + +lexer_T* lexer_init(char* content); +void lexer_next(lexer_T* lexer); +void lexer_pass(lexer_T* lexer); +token_T* lexer_get_next_token(lexer_T* lexer); +token_T* lexer_get_string(lexer_T* lexer); +token_T* lexer_get_id(lexer_T* lexer); +token_T* lexer_next_token(lexer_T* lexer, token_T* token); +char* lexer_get_c_as_string(lexer_T* lexer); + +#endif diff --git a/src/include/main.h b/src/include/main.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/include/main.h |