jamiebuilds/the-super-tiny-compiler ? reverse-engineered prompt
Reverse engineered prompt
Build me a super tiny compiler in JavaScript that is easy to read and teaches the main parts of how a compiler works from start to finish. I want the whole thing to live in one simple code file if possible, with clear comments and a guided flow that takes a tiny input language and turns it into plain JavaScript output. Keep it educational and beginner friendly, not fancy, and make sure there are tests I can run with Node so I can see that it works.
It should be the kind of project I can open and understand even if I have never built a compiler before. If you need to look up current best practices or compare with how tiny compilers are usually shown online, go ahead and do that, but keep the final result small and approachable.
Are you gonna build this?
make sure you review the code using coderabbit