Skip to content
⛄️ Possibly the smallest compiler ever
Branch: master
Clone or download
Latest commit d8d4013 Jan 7, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Init commit Aug 25, 2016 Update Jun 22, 2019
package.json 1.0.0 Dec 31, 2016
test.js bugfix: filename error (#53) Jan 10, 2017
the-super-tiny-compiler.js Update the-super-tiny-compiler.js Jan 7, 2020

The Super Tiny Compiler

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

You can also check it out on Glitch

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!

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?

Awesome! Head on over to the the-super-tiny-compiler.js file.

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


You can’t perform that action at this time.