Jamesbarford/holyc-lang
FreeHolyC compiler & transpiler
About Jamesbarford/holyc-lang
A compiler for Terry A. Davis's HolyC programming language, implemented in C. The project includes an Ahead-of-Time (AOT) compiler that uses clang internally for linking, a Just-in-Time (JIT) compiler, a REPL, an LSP server (with neovim setup), an assembler used in asm {} blocks, and a disassembler. It works by building an AST, lowering to an SSA-based IR, and emitting x86_64 or AArch64 assembly. The compiler supports most major language features including floating-point arithmetic, inheritance, loops, and printf-style I/O. There is also experimental support for transpiling HolyC to C. The compiler is in a working state but error messages are inconsistent, and the project is intended more for educational and fun purposes than for serious software development.
Key Features
Pros & Cons
- Educational: clear mapping from source to assembly code
- Implements most major HolyC language features
- Multiple execution modes: AOT, JIT, REPL
- LSP support enables IDE integration
- Includes standard libraries for common tasks
- Cross-platform support for Intel and ARM Macs, Linux on x86_64 and AArch64
- Error messages are inconsistent and hit-or-miss
- Not intended for production or serious software development
- Transpilation to C is experimental and only partially working
- Limited to Linux and macOS; Windows requires WSL2
- Still under development with pernicious bugs