WIP: codegen backend #4

Draft
0xilly wants to merge 3 commits from 0xilly/Erythro:codegen into master
3 changed files with 42 additions and 25 deletions
Showing only changes of commit c9c83efaa0 - Show all commits

7
.editorconfig Normal file
View File

@ -0,0 +1,7 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 3.21) cmake_minimum_required(VERSION 3.21)
project(Erythro C) project(Erythro C CXX)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories(include) include_directories(include)
add_executable(Erythro set(ERYTHRO_SRC
include/Data.h
include/Defs.h
src/Assembler.c src/Assembler.c
src/Delegate.c src/Delegate.c
src/Dump.c src/Dump.c
@ -18,4 +20,7 @@ add_executable(Erythro
src/Statements.c src/Statements.c
src/Symbols.c src/Symbols.c
src/Types.c src/Types.c
src/Importer.c) src/Importer.c
)
add_executable(eryc ${ERYTHRO_SRC})

View File

@ -12,6 +12,11 @@
#include <limits.h> #include <limits.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef __APPLE__
#include <errno.h>
#endif
/** /**
* The function of the importer is to read in definitions from a file, and store * The function of the importer is to read in definitions from a file, and store
* them into the symbol tables. * them into the symbol tables.