This topic has been hidden because it was flagged for abuse.

Showing 1-5 of 5 messages
This message has been hidden because it was flagged for abuse.
Re: [coffeescript] Source map support plan Steve Howell 12/21/11 7:43 AM
Hi Rob,

This looks like a good plan to me.

The Location object seems like a good way to make the patch a little less invasive with respect to grammar.coffee, and it could be extended eventually to have column support as well as just the line number.

As I mentioned on ticket 558, there have been some previous patches that got rejected due to all the special cases in grammar.coffee, which you are obviously aware of.  It would be great to get some buy-in from the core contributors before proceeding, so you might want to ping them on the ticket.

My two cents is that line number support is obviously important, so if it comes at the cost of a little complexity in grammar.coffee, it is well worth it.  I think a well-designed patch would make the code a little uglier, but it wouldn't really make it more complex.  Sure, each line would have to pass along a little more state to create the node, but it wouldn't require any complex constructs.

There are probably some opportunities to pre-factoring grammar.coffee to make a line-number patch easier, but the more I think about it, the more I think we should just go for it, and future patches could probably clean it up.

The timing seems right to me.  At this point the CoffeeScript grammar should be pretty stable.  From my perspective, the best thing to do with CS now is to leave the core language more or less alone, because it's really beautiful as it stands.  If the language can stay relatively stable, it would create a great opportunity to close the gaps on tooling, and line number support is a big part of that.




From: Rob Tsuk <rob...@google.com>
To: coffeescript <coffee...@googlegroups.com>
Sent: Tuesday, December 20, 2011 4:42 PM
Subject: [coffeescript] Source map support plan
This message has been hidden because it was flagged for abuse.
Re: [coffeescript] Source map support plan Steve Howell 12/21/11 5:46 PM
Nice work.  What does your generated parser.js look like?  I agree that the .setLocation() is a bit uglifying, but it's not horrible.  The o() function is already kind of cryptic, even before your patch.  I think the end game here is to define a simple DSL for the grammar that is not built on top of coffee itself, and then write a custom parser to make it play nice with Jison.

The mailing list might not be the best forum for this discussion.  I think a lot of core-CS-dev type of discussions tend to happen via github issues or irc.


From: Rob Tsuk <rob...@google.com>
To: coffee...@googlegroups.com
Sent: Wednesday, December 21, 2011 5:13 PM
Subject: Re: [coffeescript] Source map support plan
This message has been hidden because it was flagged for abuse.