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