From ede1b24458f60228a1a8fe6c6f1127d046632946 Mon Sep 17 00:00:00 2001 From: "Samuel D. Crow" Date: Mon, 1 Aug 2022 21:48:40 -0500 Subject: [PATCH] REmove unneeded type and update the README.md file --- README.md | 22 ++++++++++++++++++++++ yab2cpp.h | 1 - yabFunctions.cpp | 3 +-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ce2979..5ee9d3f 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,25 @@ A C++ export engine for the Yab interpreted language. +## Download Source Instructions + +`git clone --recurse-submodules --depth 1 https://github.com/SamuraiCrow/Yab2Cpp.git` + +If you forget to recurse-submodules or if the submodule code gets stale, type the following after it is done downloading: +`git submodule update --init --recursive` + +## Compiling the Test Codes + +Type the following in the Yab2Cpp directory and substitute the actual number of threads your CPU can run after the -j: +`make -j8 debug` or just `make -j8` for a release build. + +Once it's done building, you can run the test code by typing: +`./tester` or `./tester -G` if you want it to generate all the build logs too. + +To compile the executable, type `cd runtime` then `make -j8` and finally `./main` to try it out. + +--- + +## Note: + +The current version only supports test code for the code generator. Progress is ongoing. diff --git a/yab2cpp.h b/yab2cpp.h index df8704c..25f29a6 100644 --- a/yab2cpp.h +++ b/yab2cpp.h @@ -112,7 +112,6 @@ enum CODES:unsigned int T_STRINGFUNC, T_FLOATFUNC, T_INTFUNC, - T_VOIDFUNC, T_UNKNOWNFUNC }; diff --git a/yabFunctions.cpp b/yabFunctions.cpp index 9eecfbf..edb0327 100644 --- a/yabFunctions.cpp +++ b/yabFunctions.cpp @@ -192,8 +192,7 @@ void fn::close() { /* check if no returns and no return type */ enum CODES t=this->getType(); - if (this->kind==T_UNKNOWN&& - (t==T_UNKNOWNFUNC||t==T_VOIDFUNC)) + if (this->kind==T_UNKNOWN && t==T_UNKNOWNFUNC) { /* generate a typeless return */ this->generateReturn();