From 88efd9515c207fa5f5d45869896d3ad8de6d31e8 Mon Sep 17 00:00:00 2001 From: cozis Date: Mon, 1 Nov 2021 04:05:23 +0000 Subject: [PATCH] bugfix --- src/compiler/parse.c | 3 +-- src/main.c | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/parse.c b/src/compiler/parse.c index 652e6c1..976ee58 100644 --- a/src/compiler/parse.c +++ b/src/compiler/parse.c @@ -399,8 +399,7 @@ static Node *parse_expression_statement(Context *ctx) static Node *parse_string_primary_expression(Context *ctx) { assert(ctx != NULL); - assert(ctx->token->kind == TSTRING); - + if(done(ctx)) { Error_Report(ctx->error, 0, "Source ended where a string literal was expected"); diff --git a/src/main.c b/src/main.c index 5320651..bc4ebb0 100644 --- a/src/main.c +++ b/src/main.c @@ -181,8 +181,6 @@ int main(int argc, char **argv) BPAlloc_Free(alloc); } - Executable_Dump(exe); - // Execute { Runtime *runtime = Runtime_New(-1, -1); @@ -329,8 +327,11 @@ int main(int argc, char **argv) } case DISASSEMBLY: - fprintf(stderr, "Not implemented yet.\n"); - return 1; + { + Executable_Dump(exe); + return 1; + } + } return 0; }