alxlit/coffeescript-php — Issue #2: Block comments within object declarations sometimes compile incorrectly
Author: kochb
Created: 2012-03-10 02:01:44+00:00
State: open

Placing a block comment in the middle of an object declaration sometimes breaks the coffeescript-php output, while the official coffee compiler handles them just fine.

#### Sample Coffee file

App.extend

hello: ->
"hi"

###
Where Am I?

This block comment will trigger a compiler bug.
###
where_am_i: (location) ->
"oh no!"

#### Result

(function() {
App.extend({
hello: function() {
return "hi";
}
}, (function() {
/*
Where Am I?

This block comment will trigger a compiler bug.
*/
})(), {
where_am_i: function(location) {
return "oh no!";
}
});
}).call(this);

#### Reference Rendering, generated by coffee

(function() {

App.extend({
hello: function() {
return "hi";
},
/*
Where Am I?

This block comment will trigger a compiler bug.
*/
where_am_i: function(location) {
return "oh no!";
}
});

}).call(this);

No pressing need for this to be fixed on my part, just reporting it. Nice work so far.