diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-10-08 04:16:27 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2024-10-08 04:17:08 +0330 |
commit | addd54dc31603dc204773d3108dba4e000cd7657 (patch) | |
tree | 621620c4ca5634680d7655e3474cf0b0bcec8e01 /project | |
parent | bf84010e01bb11874689ce53ea4df853b2e41c2b (diff) |
added fasm support
added compiler options
tried to compile to fasm first
Diffstat (limited to 'project')
-rwxr-xr-x | project | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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" |