News for hackers. Stuff that matters.
Re:Making Coffeescript’s Whitespace More Significant by scotty79 on Wednesday November 30, 2011 @03:35PM (#3296787)
Where do I sign?

Do you think it would be hard to introduce such feature to CoffeScript on your own?

Re:Making Coffeescript’s Whitespace More Significant by jashkenas on Wednesday November 30, 2011 @08:59PM (#3297929)
No, it wouldn't be terribly hard. The source code is all annotated to make it easier for folks to get started trying out their own flavors:

http://coffeescript.org/documentation/docs/grammar.html

You'd probably want to start by altering the lexer to stop considering ...

    a
      .b
      .c
      .d
... as effectively a single line, and turn it into some sort of "chain" node. Then, the value of the expression "a" can be cached at the beginning, and all further operations in the chain can be performed against the original value.