holy holy c template
- Python 96.3%
- HolyC 3.5%
- Assembly 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| run.sh | ||
| write.asm | ||
| write.o | ||
| write_macos.asm | ||
| write_macos.o | ||
Holy Holy C Compiler.
Holy Holy C a language inspired by Holy-C.
In the memory of Terry A. Davis: https://www.youtube.com/watch?v=NYClgSGzWnI
remy clarke said python is kinda suitable for compiler development. it works tho, since the rust came up we don't give a sh*t about compile times as well. still i'm thinking about writing the compiler in rust when it's done
Features
- LLVM-based: Compile to any target.
- Base level Holy-C syntax support
- C ABI Support
- Class Methods
- Auto Enums
- Auto importings
- Builtin macro functions
- Cross platform libc (Future planned)
Current Status
What's New in v0.1.0
Features
Enums
- Added support for enum access using the scope resolution operator (
::). - Automatic value assignment for enums.
- Support for string enums.
Code Generation
- Refactored
codegen.pyinto multiple files for better maintainability. - Enhanced linker for bare-metal targets and added target options.
- Added array declaration functions and array casting to pointers in function calls.
- Improved array access handling, including pointer types and indexing.
- Enhanced expression handling with array access, unary, and postfix operations.
Functionality Improvements
- Added support for user-typed and pointer parameters in functions.
- Enhanced function call handling with automatic array decay.
- Added direct
forloop statement support.
Language Enhancements
- Added support for C-style casting and complex type casting.
- Added handling for character literals in the lexer.
Prerequirements
sudo apt install python3-llvmlite
Testing
Create a virtual enviroment and get into it
pip3 install llvmlite
python3 src/compiler.py src/code/inlineasm_test.HC -o test
./test
Contribution
You can check issues page for any help, Thx!
our discord server: https://discord.gg/GY5C7XfgXz