jashkenas/coffee-script — pull request #2286 by bolinfest (2012-04-25 20:56:56+00:00)
Title: Made a separate file where third-parties can add their extensions...

...to CoffeeScript's grammar.

This is my first step in an attempt to create a maintainable fork of CoffeeScript that supports Closure Library-style annotations. For example, the following CoffeeScript:

class Animal
constructor: (`string` @name) ->

move: (`number` meters) ->
alert @name + " moved #{meters}m."

Would ideally become:

goog.provide('Animal');

/**
* @param {string} name
* @constructor
*/
Animal = function(name) {
this.name = name;
};

/** @param {number} meters */
Animal.prototype.move = function(meters) {
return alert(this.name + (" moved " + meters + "m."));
};