holy holy c template
  • Python 96.3%
  • HolyC 3.5%
  • Assembly 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-10-11 23:43:05 +03:00
src feat(codegen): add -ds --dump-symboltable arguement to compiler 2025-10-11 23:43:05 +03:00
.gitignore Update .gitignore 2025-09-10 23:49:39 +03:00
LICENSE Initial commit 2025-03-03 09:42:45 +03:00
README.md Update README.md 2025-09-03 05:54:06 +03:00
run.sh Update run script to use debug logging and modify test4.HC to include simple_func for addition 2025-05-11 15:43:05 +03:00
write.asm refactor: simplify stdout_write function by removing unnecessary stack operations 2025-08-30 02:25:13 +03:00
write.o feat: update write.o 2025-09-03 01:25:51 +03:00
write_macos.asm feat: implement stdout_write for macOS and enhance Linux version with argument preservation 2025-06-09 07:30:36 +03:00
write_macos.o feat: implement stdout_write for macOS and enhance Linux version with argument preservation 2025-06-09 07:30:36 +03:00

Holy Holy C Compiler.

ago_downloaded

holy-holy-c-logo

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.py into 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 for loop 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