From f530f7399010c7faa6544a8a23e8120e405db24b Mon Sep 17 00:00:00 2001 From: Omar Date: Mon, 28 Aug 2023 09:12:43 +0000 Subject: [PATCH] moved lib to src/lib --- CMakeLists.txt | 2 +- native/prime.cpp | 2 +- src/assembler.cpp | 6 +++--- src/banana.cpp | 8 ++++---- src/banana_test.cpp | 8 ++++---- {lib => src/lib}/ast.cpp | 0 {lib => src/lib}/ast.h | 0 {lib => src/lib}/byteutils.cpp | 0 {lib => src/lib}/byteutils.h | 0 {lib => src/lib}/c_functions.cpp | 0 {lib => src/lib}/c_functions.h | 0 {lib => src/lib}/c_interface.h | 0 {lib => src/lib}/fileutils.cpp | 0 {lib => src/lib}/fileutils.h | 0 {lib => src/lib}/instructions.cpp | 0 {lib => src/lib}/instructions.h | 0 {lib => src/lib}/maputils.h | 0 {lib => src/lib}/parser.cpp | 0 {lib => src/lib}/parser.h | 0 {lib => src/lib}/scanner.cpp | 0 {lib => src/lib}/scanner.h | 0 {lib => src/lib}/var.cpp | 0 {lib => src/lib}/var.h | 0 {lib => src/lib}/vm.cpp | 0 {lib => src/lib}/vm.h | 0 25 files changed, 13 insertions(+), 13 deletions(-) rename {lib => src/lib}/ast.cpp (100%) rename {lib => src/lib}/ast.h (100%) rename {lib => src/lib}/byteutils.cpp (100%) rename {lib => src/lib}/byteutils.h (100%) rename {lib => src/lib}/c_functions.cpp (100%) rename {lib => src/lib}/c_functions.h (100%) rename {lib => src/lib}/c_interface.h (100%) rename {lib => src/lib}/fileutils.cpp (100%) rename {lib => src/lib}/fileutils.h (100%) rename {lib => src/lib}/instructions.cpp (100%) rename {lib => src/lib}/instructions.h (100%) rename {lib => src/lib}/maputils.h (100%) rename {lib => src/lib}/parser.cpp (100%) rename {lib => src/lib}/parser.h (100%) rename {lib => src/lib}/scanner.cpp (100%) rename {lib => src/lib}/scanner.h (100%) rename {lib => src/lib}/var.cpp (100%) rename {lib => src/lib}/var.h (100%) rename {lib => src/lib}/vm.cpp (100%) rename {lib => src/lib}/vm.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc21994..af51c87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17) project (banana) -file(GLOB SOURCES "lib/*.cpp") +file(GLOB SOURCES "src/lib/*.cpp") add_library(banana_lib ${SOURCES}) target_link_libraries(banana_lib -lffi) diff --git a/native/prime.cpp b/native/prime.cpp index 089b3fe..f453242 100644 --- a/native/prime.cpp +++ b/native/prime.cpp @@ -1,4 +1,4 @@ -#include "../lib/c_interface.h" +#include "../src/lib/c_interface.h" bool is_prime(const long& n) { for (long i=2; i #include #include -#include "../lib/instructions.h" -#include "../lib/byteutils.h" -#include "../lib/fileutils.h" +#include "lib/instructions.h" +#include "lib/byteutils.h" +#include "lib/fileutils.h" std::string trim(const std::string& str, const std::string& character) { size_t begin = str.find_first_not_of(character); diff --git a/src/banana.cpp b/src/banana.cpp index 5d60273..9aa7607 100644 --- a/src/banana.cpp +++ b/src/banana.cpp @@ -1,10 +1,10 @@ #include #include #include -#include "../lib/ast.h" -#include "../lib/scanner.h" -#include "../lib/parser.h" -#include "../lib/fileutils.h" +#include "lib/ast.h" +#include "lib/scanner.h" +#include "lib/parser.h" +#include "lib/fileutils.h" std::vector> get_instructions( const std::string& filename, diff --git a/src/banana_test.cpp b/src/banana_test.cpp index 44068cb..43a7a8f 100644 --- a/src/banana_test.cpp +++ b/src/banana_test.cpp @@ -1,9 +1,9 @@ #include #include -#include "../lib/ast.h" -#include "../lib/scanner.h" -#include "../lib/parser.h" -#include "../lib/vm.h" +#include "lib/ast.h" +#include "lib/scanner.h" +#include "lib/parser.h" +#include "lib/vm.h" #include "gtest/gtest.h" namespace { diff --git a/lib/ast.cpp b/src/lib/ast.cpp similarity index 100% rename from lib/ast.cpp rename to src/lib/ast.cpp diff --git a/lib/ast.h b/src/lib/ast.h similarity index 100% rename from lib/ast.h rename to src/lib/ast.h diff --git a/lib/byteutils.cpp b/src/lib/byteutils.cpp similarity index 100% rename from lib/byteutils.cpp rename to src/lib/byteutils.cpp diff --git a/lib/byteutils.h b/src/lib/byteutils.h similarity index 100% rename from lib/byteutils.h rename to src/lib/byteutils.h diff --git a/lib/c_functions.cpp b/src/lib/c_functions.cpp similarity index 100% rename from lib/c_functions.cpp rename to src/lib/c_functions.cpp diff --git a/lib/c_functions.h b/src/lib/c_functions.h similarity index 100% rename from lib/c_functions.h rename to src/lib/c_functions.h diff --git a/lib/c_interface.h b/src/lib/c_interface.h similarity index 100% rename from lib/c_interface.h rename to src/lib/c_interface.h diff --git a/lib/fileutils.cpp b/src/lib/fileutils.cpp similarity index 100% rename from lib/fileutils.cpp rename to src/lib/fileutils.cpp diff --git a/lib/fileutils.h b/src/lib/fileutils.h similarity index 100% rename from lib/fileutils.h rename to src/lib/fileutils.h diff --git a/lib/instructions.cpp b/src/lib/instructions.cpp similarity index 100% rename from lib/instructions.cpp rename to src/lib/instructions.cpp diff --git a/lib/instructions.h b/src/lib/instructions.h similarity index 100% rename from lib/instructions.h rename to src/lib/instructions.h diff --git a/lib/maputils.h b/src/lib/maputils.h similarity index 100% rename from lib/maputils.h rename to src/lib/maputils.h diff --git a/lib/parser.cpp b/src/lib/parser.cpp similarity index 100% rename from lib/parser.cpp rename to src/lib/parser.cpp diff --git a/lib/parser.h b/src/lib/parser.h similarity index 100% rename from lib/parser.h rename to src/lib/parser.h diff --git a/lib/scanner.cpp b/src/lib/scanner.cpp similarity index 100% rename from lib/scanner.cpp rename to src/lib/scanner.cpp diff --git a/lib/scanner.h b/src/lib/scanner.h similarity index 100% rename from lib/scanner.h rename to src/lib/scanner.h diff --git a/lib/var.cpp b/src/lib/var.cpp similarity index 100% rename from lib/var.cpp rename to src/lib/var.cpp diff --git a/lib/var.h b/src/lib/var.h similarity index 100% rename from lib/var.h rename to src/lib/var.h diff --git a/lib/vm.cpp b/src/lib/vm.cpp similarity index 100% rename from lib/vm.cpp rename to src/lib/vm.cpp diff --git a/lib/vm.h b/src/lib/vm.h similarity index 100% rename from lib/vm.h rename to src/lib/vm.h