Share this project

Done

Share this project

Done
Rewrite the CoffeeScript compiler with proper compiler design principles and a focus on robustness and versatility.
Rewrite the CoffeeScript compiler with proper compiler design principles and a focus on robustness and versatility.
277 backers pledged $13,785 to help bring this project to life.

Getting Started

We did it! I want to thank all of you for the support you've given to my project. You've given me the ability to work on my favourite open source project straight out of school. That is so exciting, and you don't know how much it means to me. Best of all, I can't wait for the community to get their hands on the result.

Here's how things are going to work. I'll begin my project by defining a reasonable subset of CoffeeScript that will allow us to eventually self-host the compiler. Then I'll design the internal data representations, which are also externally available when someone uses CoffeeScript simply as a parser. I'll then skip the CS-to-JS conversion for now and work on a simple code generator for CS ASTs, cscodegen, named after the ECMAScript code generator that we will be using, escodegen. Once I define a parser that can parse my subset of CoffeeScript and generate CoffeeScript code, I'll start writing the compiler from CS ASTs to JS ASTs. Running escodegen on this resultant AST will provide us with JavaScript output. In order to allow complete control over the output style, I will enhance escodegen to accept a grammar for generating CSTs. And of course, we're preserving offset mapping this whole time, so we'll use Mozilla's source map generator to generate source maps for us. After all that, I'll finally be ready to expand the language and include all the features I initially left out.

If you signed up for any rewards, you'll be receiving an email soon with a request for some information. And if you're signed up to receive my email updates, you'll be getting your first update in two weeks. For the rest of you, I'll post another update at the end of september detailing what was completed. If you want a continuous flow of updates, follow the project on Github at https://github.com/michaelficarra/CoffeeScript2

Again, thank you for your contribution.