jamiebuilds/the-super-tiny-compiler
{ "createdAt": "2016-03-11T04:19:18Z", "defaultBranch": "master", "description": ":snowman: Possibly the smallest compiler ever", "fullName": "jamiebuilds/the-super-tiny-compiler", "homepage": "", "language": "JavaScript", "name": "the-super-tiny-compiler", "pushedAt": "2024-02-19T12:33:21Z", "stargazersCount": 28422, "topics": [], "updatedAt": "2025-11-27T03:01:47Z", "url": "https://github.com/jamiebuilds/the-super-tiny-compiler"}[
]!(the-super-tiny-compiler.js)
Welcome to The Super Tiny Compiler!
This is an ultra-simplified example of all the major pieces of a modern compiler written in easy to read JavaScript.
Reading through the guided code will help you learn about how most compilers work from end to end.
[Want to jump into the code? Click here]!(the-super-tiny-compiler.js)
Section titled “[Want to jump into the code? Click here]!(the-super-tiny-compiler.js)”Why should I care?
Section titled “Why should I care?”That’s fair, most people don’t really have to think about compilers in their day jobs. However, compilers are all around you, tons of the tools you use are based on concepts borrowed from compilers.
But compilers are scary!
Section titled “But compilers are scary!”Yes, they are. But that’s our fault (the people who write compilers), we’ve taken something that is reasonably straightforward and made it so scary that most think of it as this totally unapproachable thing that only the nerdiest of the nerds are able to understand.
Okay so where do I begin?
Section titled “Okay so where do I begin?”Awesome! Head on over to the [the-super-tiny-compiler.js]!(the-super-tiny-compiler.js) file.
I’m back, that didn’t make sense
Section titled “I’m back, that didn’t make sense”Ouch, I’m really sorry. Let me know how it can be improved.
Run with node test.js
