r/Compilers • • May 13 '26

Code layout, Compiler inspiration

I've been developing my own compiler in C++ (LLVM based) for a month and the codebase turned into a mess. 500+ loc files, big functions and other garbage. I'm trying to find hobby compilers for inspiration. I've checked github but they're mostly very simple toy languages.

Here's my own compiler: https://github.com/budchirp/zep-lang

The syntax is very much inspired by rust, kotlin, swift and C++.

I like C++ but I hate its stdlib, headers and module management. The inspiration behind the language was making a better C++.

Can y'all roast my compiler and send your own compilers?

18 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/axlrosefan31 May 13 '26

Yeah, I guess I have accept this code in writing compilers. Every big compiler project I've inspected has 1k+ loc files. Zig compiler has files which is 10mb and can't even view it on web browser. Thanks for providing your project, I'll check it out.