aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;
}