aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorc+12023-05-03 17:06:26 -0400
committerc+12023-05-03 17:06:26 -0400
commit7ced4218e9b8317b9d7d9e8489cf24d0f406cc5d (patch)
tree18fa4e7d17d0ca6937a65dc7fb08d27d1f3d10e2 /src
parent616ee4299aacea36688115c722b8a03e77f59734 (diff)
why
Diffstat (limited to 'src')
-rw-r--r--src/lexer.c5
-rw-r--r--src/main.c1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 1f6a9d5..3a5f557 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -104,7 +104,7 @@ token_T* lexer_get_next_token(lexer_T* lexer) {
token_T* lexer_get_string(lexer_T* lexer) {
lexer_next(lexer);
- char* str_so_far = calloc(1, sizeof(char));
+ char* str_so_far = calloc(2, sizeof(char));
str_so_far[0] = '\0';
while (lexer->c != '"') {
@@ -120,14 +120,13 @@ 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) {
lexer_next(lexer);
return token;
-
}
char* lexer_get_c_as_string(lexer_T* lexer) {
diff --git a/src/main.c b/src/main.c
index 2a51a71..a9682a6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,5 +2,6 @@
int main(int argc, char* argv[]) {
printf("Hello, world.");
+
return 0;
}