Compiler-Organization/CommonC ? reverse-engineered prompt

Reverse engineered prompt

Build me a working compiler for a new language called Common C, using the code in this repo as the starting point.

I want it to parse Common C source files, check them, and compile or run a simple sample program like the Mandelbrot demo. The language should feel easy to write, with things like functions, structs, classes, arrays, if statements, loops, imports, and a print function that can handle mixed values. If something in the language is still unfinished, keep it practical and make the compiler handle the core pieces cleanly instead of overcomplicating it.

Please make the project buildable from the solution, and if needed, look up current docs online to fill in any gaps for the target platforms already mentioned in the repo. Keep the code organized and make sure the sample app still works. If you can, add or improve error messages so bad Common C code is easier to understand.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab