diff options
author | c+1 | 2023-05-03 12:58:10 -0400 |
---|---|---|
committer | c+1 | 2023-05-03 12:58:10 -0400 |
commit | 0a07b51659872e4bf7f2b78fe283d7c14c46b4f2 (patch) | |
tree | 4a9f9185343fb7cd386da4df05c13021e145fcc0 | |
parent | 223a6730d50ebdced0fec779018207b591474022 (diff) |
HALK HALK HALK
-rw-r--r-- | src/lexer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lexer.c b/src/lexer.c index 9cb3372..fa97f3b 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -102,11 +102,11 @@ token_T* lexer_get_next_token(lexer_T* lexer) { } token_T* lexer_get_string(lexer_T* lexer) { - + // while c not ", add c to token value } token_T* lexer_get_id(lexer_T* lexer) { - + // } token_T* lexer_next_token(lexer_T* lexer, token_T* token) { @@ -117,5 +117,9 @@ token_T* lexer_next_token(lexer_T* lexer, token_T* token) { } char* lexer_get_c_as_string(lexer_T* lexer) { + char* str = calloc(1, sizeof(char)); + str[0] = lexer->c; + str[1] = '\0'; + return str; } |