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,21 +1,26 @@
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 src/Assembler.c
include/Defs.h src/Delegate.c
src/Assembler.c src/Dump.c
src/Delegate.c src/Lexer.c
src/Dump.c src/Main.c
src/Lexer.c src/Parser.c
src/Main.c src/Pointers.c
src/Parser.c src/Statements.c
src/Pointers.c src/Symbols.c
src/Statements.c src/Types.c
src/Symbols.c src/Importer.c
src/Types.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.