diff --git a/README.md b/README.md index d8dc7d4..91c5bcd 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,18 @@ Peon is a simple, functional, async-first programming language with a focus on c ## Project structure -# TODO \ No newline at end of file +- `src/` -> Contains the entirety of peon's toolchain + - `src/memory` -> Contains peon's memory allocator and GC (TODO) + - `src/frontend` -> Contains the tokenizer, parser and compiler + - `src/frontend/meta` -> Contains shared error definitions, AST node and token + declarations as well as the bytecode used by the compiler + - `src/backend` -> Contains the peon VM and type system + - `src/util` -> Contains utilities such as the bytecode debugger and serializer as well + as procedures to handle multi-byte sequences + - `src/config.nim` -> Contains configuration variables + + +## Disclaimer about the project's state +The project is still in its very early days: lots of stuff is not implemented, a work in progress or +otherwise outright broken. Feel free to report bugs! + diff --git a/src/config.nim b/src/config.nim index 3a464d1..66d9ca1 100644 --- a/src/config.nim +++ b/src/config.nim @@ -14,16 +14,11 @@ import strformat + const BYTECODE_MARKER* = "PEON_BYTECODE" -const MAP_LOAD_FACTOR* = 0.75 # Load factor for builtin hashmaps -when MAP_LOAD_FACTOR >= 1.0: - {.fatal: "Hashmap load factor must be < 1".} const HEAP_GROW_FACTOR* = 2 # How much extra memory to allocate for dynamic arrays and garbage collection when resizing when HEAP_GROW_FACTOR <= 1: {.fatal: "Heap growth factor must be > 1".} -const MAX_STACK_FRAMES* = 800 # The maximum number of stack frames at any one time. Acts as a recursion limiter (1 frame = 1 call) -when MAX_STACK_FRAMES <= 0: - {.fatal: "The frame limit must be > 0".} const PEON_VERSION* = (major: 0, minor: 4, patch: 0) const PEON_RELEASE* = "alpha" const PEON_COMMIT_HASH* = "ed79385e2a93100331697f26a4a90157e60ad27a" @@ -33,7 +28,6 @@ const PEON_BRANCH* = "master" when len(PEON_BRANCH) > 255: {.fatal: "The git branch name's length must be less than or equal to 255 characters".} const DEBUG_TRACE_VM* = false # Traces VM execution -const SKIP_STDLIB_INIT* = false # Skips stdlib initialization (can be imported manually) const DEBUG_TRACE_GC* = false # Traces the garbage collector (TODO) const DEBUG_TRACE_ALLOCATION* = false # Traces memory allocation/deallocation const DEBUG_TRACE_COMPILER* = false # Traces the compiler