Closed lemonmade closed 8 years ago
This could be tricky from a technical perspective. Might have to mess with scope
as a temporary store again. The point where decaf
goes AAAAAAAAAARGH is: https://github.com/Shopify/decaf/blob/master/src/parser.js#L361.
Discussed in #155. Currently, decaf with throw an error on this:
Because there is no comparable JS thing for private members scoped to a class. I think we should just move the statements to the upper scope, as the linter will catch any duplicate declarations if there are any (which I think is unlikely). So, this:
Becomes:
(I am guessing on what exactly the
bar =
becomes, but whatever happens our transforms should turn it into what we want (a function declaration)).