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)
project(Erythro C)
project(Erythro C CXX)
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)
add_executable(Erythro
include/Data.h
include/Defs.h
src/Assembler.c
src/Delegate.c
src/Dump.c
src/Lexer.c
src/Main.c
src/Parser.c
src/Pointers.c
src/Statements.c
src/Symbols.c
src/Types.c
src/Importer.c)
set(ERYTHRO_SRC
src/Assembler.c
src/Delegate.c
src/Dump.c
src/Lexer.c
src/Main.c
src/Parser.c
src/Pointers.c
src/Statements.c
src/Symbols.c
src/Types.c
src/Importer.c
)
add_executable(eryc ${ERYTHRO_SRC})

View File

@ -12,6 +12,11 @@
#include <limits.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
* them into the symbol tables.