aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}