2025-01-28 13:43:38 +01:00
|
|
|
# Overview
|
|
|
|
|
2025-02-07 11:38:21 +01:00
|
|
|
- [arm](arm) - ARM64 implementation (w.i.p.)
|
2025-01-28 13:43:38 +01:00
|
|
|
- [asm](asm) - Pseudo-assembler stage
|
2025-02-06 23:26:10 +01:00
|
|
|
- [asmc](asmc) - Compiles assembler to actual machine code
|
2025-01-28 13:43:38 +01:00
|
|
|
- [ast](ast) - Abstract syntax tree generation with the `Parse` function
|
|
|
|
- [build](build) - Build command
|
|
|
|
- [cli](cli) - Command line interface
|
|
|
|
- [compiler](compiler) - Compiler frontend used by `build`
|
|
|
|
- [config](config) - Globals for the entire project
|
|
|
|
- [core](core) - Definition of `Function` and how to compile it (uses `register.Machine`)
|
|
|
|
- [cpu](cpu) - Types to simulate a generic CPU during compilation
|
|
|
|
- [data](data) - Data container that can re-use existing data (e.g. the `Hello` in `Hello World`)
|
|
|
|
- [dll](dll) - DLL support for Windows systems (w.i.p.)
|
|
|
|
- [elf](elf) - ELF format for Linux executables
|
|
|
|
- [errors](errors) - Error types
|
|
|
|
- [expression](expression) - Expression parser generating trees with the `Parse` function
|
|
|
|
- [fs](fs) - File system access
|
|
|
|
- [macho](macho) - MachO format for Mac executables
|
|
|
|
- [pe](pe) - PE format for Windows executables
|
|
|
|
- [register](register) - Defines `Machine` type combining an assembler with CPU states
|
|
|
|
- [riscv](riscv) - RISCV implementation (w.i.p.)
|
|
|
|
- [scanner](scanner) - Scanner frontend used by `build`
|
|
|
|
- [scope](scope) - Defines a `Scope` used for code blocks
|
|
|
|
- [sizeof](sizeof) - Calculates the byte size of numbers
|
|
|
|
- [token](token) - Converts a file to tokens with the `Tokenize` function
|
2025-02-07 11:38:21 +01:00
|
|
|
- [types](types) - Type system
|
2025-02-05 23:16:18 +01:00
|
|
|
- [x86](x86) - x86-64 implementation
|
2025-02-21 22:39:01 +01:00
|
|
|
|
|
|
|
## Typical flow
|
|
|
|
|
|
|
|
1. [main](../main.go)
|
|
|
|
1. [cli.Main](cli/Main.go)
|
|
|
|
1. [build.Run](build/Run.go)
|
|
|
|
1. [scanner.Scan](scanner/Scan.go)
|
|
|
|
1. [compiler.Compile](compiler/Compile.go)
|
|
|
|
1. [compiler.WriteFile](compiler/WriteFile.go)
|