summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-26 14:08:26 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-26 14:08:26 +0330
commitcccf0dd70816133398fc5d3a8c666b07753edc1e (patch)
treef87a44a4b85b940e16c5dd993fe377102b576bbe
parentb581b5918219a5f5169d59faca6f4dee20531482 (diff)
some clean up
-rw-r--r--Makefile4
-rw-r--r--code/main.felan2
-rw-r--r--src/compiler/lexer.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d9f18bf..62214dc 100644
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,9 @@ INC_DIRS := $(SRC_DIR)
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
# OP_FLAG := -Ofast
-OP_FLAG := -O3
+# OP_FLAG := -O3
# OP_FLAG := -Oz
-# OP_FLAG := -g
+OP_FLAG := -g
# CFLAGS := $(INC_FLAGS) -Wall -Wextra -std=gnu23 -DPRINT_STATISTICS -DPRINT_COMPILE_TREE $(OP_FLAG)
CFLAGS := $(INC_FLAGS) -Wall -Wextra -std=gnu23 -DPRINT_STATISTICS $(OP_FLAG)
diff --git a/code/main.felan b/code/main.felan
index daad667..8db7e31 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -1,4 +1,4 @@
-@import("basic.felan");
+@import("lib/print.felan");
main :: () -> void {
str := "123\n";
diff --git a/src/compiler/lexer.c b/src/compiler/lexer.c
index 1c7e546..6fe481c 100644
--- a/src/compiler/lexer.c
+++ b/src/compiler/lexer.c
@@ -417,7 +417,7 @@ inline __attribute__((always_inline)) void lexerPushClear(LexerNodeArray *array,
goto RETURN_SUCCESS;
}
printLog("Bad token '%d'", *node_token);
- exit(1);
+ UNREACHABLE;
RETURN_SUCCESS:
*node_str_begin = iter;
*node_token = token;