From ac6f3c449ac60be0399b90224744a1c07939aa58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Grodzi=C5=84ski?= Date: Sat, 21 Jun 2025 17:34:05 +0900 Subject: [PATCH] Fixed exception and removed scripts --- clean.sh | 6 ------ make.sh | 6 ------ src/Parser/Statement.cpp | 11 +++++++---- src/main.cpp | 4 ++-- 4 files changed, 9 insertions(+), 18 deletions(-) delete mode 100755 clean.sh delete mode 100755 make.sh diff --git a/clean.sh b/clean.sh deleted file mode 100755 index f618bdf..0000000 --- a/clean.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -rm -f brb -rm -f *.o -rm -f *.asm -rm -rf *.dSYM \ No newline at end of file diff --git a/make.sh b/make.sh deleted file mode 100755 index 39f883b..0000000 --- a/make.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -IFLAGS="-I/usr/local/opt/llvm/include -I/opt/homebrew/opt/llvm/include" -LDFLAGS="-L/usr/local/opt/llvm/lib -L/opt/homebrew/opt/llvm/lib" - -cc -g -std=c++17 -lc++ -lllvm -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 ${LDFLAGS} ${IFLAGS} src/*.cpp -o brb \ No newline at end of file diff --git a/src/Parser/Statement.cpp b/src/Parser/Statement.cpp index 177a7ef..832924f 100644 --- a/src/Parser/Statement.cpp +++ b/src/Parser/Statement.cpp @@ -149,10 +149,13 @@ string StatementReturn::toString(int indent) { string value; for (int ind=0; indtoString(indent+1); + value += "RETURN"; + if (expression != nullptr) { + value += ":\n"; + for (int ind=0; indtoString(indent+1); + } value += "\n"; return value; } diff --git a/src/main.cpp b/src/main.cpp index f95a387..ddb62fe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,8 +80,8 @@ int main(int argc, char **argv) { module->print(llvm::outs(), nullptr); } - //CodeGenerator codeGenerator(module); - //codeGenerator.generateObjectFile(outputKind); + CodeGenerator codeGenerator(module); + codeGenerator.generateObjectFile(outputKind); return 0; } \ No newline at end of file