From 0a07b51659872e4bf7f2b78fe283d7c14c46b4f2 Mon Sep 17 00:00:00 2001 From: c+1 Date: Wed, 3 May 2023 12:58:10 -0400 Subject: HALK HALK HALK --- src/lexer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3