Assembler #6

Merged
andre merged 12 commits from assembler into master 2026-05-01 10:12:41 -05:00
6 changed files with 52 additions and 0 deletions
Showing only changes of commit 24a7d1f6cd - Show all commits

View File

@@ -80,6 +80,10 @@ add_library(lib${PROJECT_NAME} SHARED
src/vm/expr.cc
src/vm/expr.hh
src/vm/location.hh
src/assembler/lexer.cc
src/assembler/lexer.hh
src/assembler/assembler.cc
src/assembler/assembler.hh
)
target_compile_options(lib${PROJECT_NAME} PRIVATE ${warnings})
@@ -88,6 +92,8 @@ target_compile_options(lib${PROJECT_NAME} PRIVATE ${warnings})
# tests
#
enable_testing()
add_executable(${PROJECT_NAME}-bytecode-test src/bytecode/tests.cc)
target_link_libraries(${PROJECT_NAME}-bytecode-test lib${PROJECT_NAME} gtest_main)
add_test(NAME tyche_bytecode_test COMMAND ${PROJECT_NAME}-bytecode-test)
@@ -96,6 +102,10 @@ add_executable(${PROJECT_NAME}-vm-test src/vm/tests.cc)
target_link_libraries(${PROJECT_NAME}-vm-test lib${PROJECT_NAME} gtest_main)
add_test(NAME tyche_vm_test COMMAND ${PROJECT_NAME}-vm-test)
add_executable(${PROJECT_NAME}-as-test src/assembler/tests.cc)
target_link_libraries(${PROJECT_NAME}-as-test lib${PROJECT_NAME} gtest_main)
add_test(NAME tyche_as_test COMMAND ${PROJECT_NAME}-as-test)
#
# check for leaks
#

View File

@@ -0,0 +1,7 @@
#include "assembler.hh"
namespace tyche::as {
} // tyche

View File

@@ -0,0 +1,12 @@
#ifndef TYCHE_ASSEMBLER_HH
#define TYCHE_ASSEMBLER_HH
namespace tyche::as {
class Assembler {
};
} // tyche
#endif //TYCHE_ASSEMBLER_HH

4
src/assembler/lexer.cc Normal file
View File

@@ -0,0 +1,4 @@
#include "lexer.hh"
namespace tyche::as {
} // tyche

12
src/assembler/lexer.hh Normal file
View File

@@ -0,0 +1,12 @@
#ifndef TYCHE_LEXER_HH
#define TYCHE_LEXER_HH
namespace tyche::as {
class Lexer {
};
} // tyche
#endif //TYCHE_LEXER_HH

7
src/assembler/tests.cc Normal file
View File

@@ -0,0 +1,7 @@
#include "gtest/gtest.h"
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}