aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc+12023-05-03 12:58:10 -0400
committerc+12023-05-03 12:58:10 -0400
commit0a07b51659872e4bf7f2b78fe283d7c14c46b4f2 (patch)
tree4a9f9185343fb7cd386da4df05c13021e145fcc0
parent223a6730d50ebdced0fec779018207b591474022 (diff)
HALK HALK HALK
-rw-r--r--src/lexer.c8
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;
}