Closed GoodForOneFare closed 8 years ago
Hm. @GoodForOneFare I think a flag would be nice.
Also, how does this deal with naming collisions, I'd like to make sure that these variable names don't collide with any other variable names, since they're mounted in the same scope as the class definition.
At the moment it only warns about naming collisions. I can take a look at throwing exceptions.
Any preference for a flag name? transform_class_private_statements=[true|false]
with a default of false
?
@GoodForOneFare decaf --private-class-statements
with a boolean :+1:
thanks dude
@GoodForOneFare no need to throw exceptions, instead you could use the coffeescript helper attached to the meta object, meta.scope.freeVariable
>> https://github.com/rainforestapp/decaf/blob/master/src/parser.js#L202 that should ensure integrity
@GoodForOneFare @juliankrispel what's the status on this?
I have a work in progress that's most of the way there, but other stuff came up. I'll take a look this weekend to pare down what I have and get a PR up.
@GoodForOneFare I'd be up for pairing if you wanna
@GoodForOneFare @juliankrispel is this gonna happen?
I'm gonna close this. Please re-open @juliankrispel if you get time
…below the class.
This works for Shopify's codebase because we have one class per file, and don't do anything weird with private-static calls. If it'd help to get this PR accepted, I can add a command line flag to enable/disable this behaviour.