diff --git a/build/main.o b/build/main.o index ad102ab..5abb441 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/src/main.cpp b/src/main.cpp index b8a9c3e..fc4962a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ #include "parser.h" #include "ast_printer.h" #include "codegen.h" +#include "version.h" #include #include @@ -167,7 +168,7 @@ void* sun_read_csv(char* filename, char* separator, char* quote) { )"; void printUsage() { - std::cout << "Sun Language Compiler v0.1.0" << std::endl; + std::cout << "Sun Language Compiler v" << SUN_VERSION << std::endl; std::cout << "Usage: sun [options]" << std::endl; std::cout << "Options:" << std::endl; std::cout << " -o Specify output executable name" << std::endl; @@ -183,7 +184,7 @@ int main(int argc, char* argv[]) { std::string arg1 = argv[1]; if (arg1 == "-v" || arg1 == "--version") { - std::cout << "Sun Language Compiler v0.1.0" << std::endl; + std::cout << "Sun Language Compiler v" << SUN_VERSION << std::endl; return 0; } if (arg1 == "-h" || arg1 == "--help") { diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..c12172a --- /dev/null +++ b/src/version.h @@ -0,0 +1,6 @@ +#ifndef SUN_VERSION_H +#define SUN_VERSION_H + +#define SUN_VERSION "0.3.0" + +#endif // SUN_VERSION_H diff --git a/sun b/sun index 03a2a86..968c824 100755 Binary files a/sun and b/sun differ