From addd54dc31603dc204773d3108dba4e000cd7657 Mon Sep 17 00:00:00 2001
From: A404M <ahmadmahmoudiprogrammer@gmail.com>
Date: Tue, 8 Oct 2024 04:16:27 +0330
Subject: added fasm support added compiler options tried to compile to fasm
 first

---
 project | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'project')

diff --git a/project b/project
index 0964681..6ceac89 100755
--- a/project
+++ b/project
@@ -10,7 +10,7 @@ function compile(){
     fi
   fi
 
-  gcc -Wall -Wextra -std=gnu23 -I./src/ -O3 \
+  gcc -Wall -Wextra -std=gnu23 -I./src/ -g \
     ./src/main.c \
     ./src/compiler/source_code/source_code.c \
     ./src/compiler/error_helper/error_helper.c \
@@ -18,6 +18,11 @@ function compile(){
     ./src/compiler/parser/parser.c \
     ./src/compiler/tree_parser/tree_parser.c \
     ./src/compiler/code_generator/code_generator.c \
+    ./src/compiler/fasm_generator/fasm_generator.c \
+    ./src/fasm/lexer/lexer.c \
+    ./src/fasm/linker/linker.c \
+    ./src/fasm/code_generator/code_generator.c \
+    ./src/fasm/runner/runner.c \
     ./src/vm/runner/runner.c \
     ./src/utils/memory/memory.c \
     ./src/utils/file.c \
@@ -56,7 +61,7 @@ function test(){
   for file_path in ./test/input/*; do
     local file_name=$(basename "$file_path")
     local start=`date +%s.%N`
-    local ret=$(eval "./build/$project_name $file_path > ./test/generated_output/$file_name")
+    local ret=$(eval "./build/$project_name run-felan $file_path > ./test/generated_output/$file_name")
     local end=`date +%s.%N`
     runtime="$(jq -n $end-$start)"
     $ret && \
@@ -78,7 +83,7 @@ function val_test(){
 
   for file_path in ./test/input/*; do
     local file_name=$(basename "$file_path")
-    valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all -s "./build/$project_name" "$file_path" ./test/generated_output/ && \
+    valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all -s "./build/$project_name" run-felan "$file_path" ./test/generated_output/ && \
     cmp --silent "./test/generated_output/$file_name" "./test/output/$file_name" && \
     printf "${GREEN}PASSED${NC} $file_path\n" || \
     printf "${RED}FAILED${NC} $file_path\n"
-- 
cgit v1.2.3