6 ms·
CoffeeScript is implemented in CoffeeScript itself, and this is the unabridged source code for it, in literate programming style. Quick links to other interest
by jashkenas 17y ago
CoffeeScript is implemented in CoffeeScript itself, and this is the unabridged source code for it, in literate programming style.
Quick links to other interesting bits (also accessible from the "Jump to" link on that page):
The Lexer, which has some extra smarts to help keep the grammar cleaner than it otherwise would be:
http://jashkenas.github.com/coffee-script/documentation/docs/lexer.html http://jashkenas.github.com/coffee-script/documentation/docs...
The implementation of lexical scope:
http://jashkenas.github.com/coffee-script/documentation/docs/scope.html http://jashkenas.github.com/coffee-script/documentation/docs...
The "coffee" command-line utility:
http://jashkenas.github.com/coffee-script/documentation/docs/command.html http://jashkenas.github.com/coffee-script/documentation/docs...
All of those pages are created by a little literate-programming-style documentation generator called "Docco". If you run it on itself, you get this:
http://jashkenas.github.com/docco/ http://jashkenas.github.com/docco/
Hopefully we'll get some good patches from having the source in the open like this.
- grayrest 17y agoHaving poked around the source as part of implementing full vim support, I believe that nodes.coffee [1] exercises every single coffeescript feature except splats and js escaping, so that might be interesting to people as well even if it is a less interesting part of the source. [1] http://gr.ayre.st/s/nodes.coffee.html http://gr.ayre.st/s/nodes.coffee.html Also, this isn't 0.5.5? Waiting for interpolation to settle? * I'll put out my vim stuff when I write the indent script.