-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: allow super in object literals #5075
Comments
Any thoughts @connec or @helixbass ? |
I didn't realise that was valid 😄 I don't see any reason not to support it. |
Should all methods in object literals transpile to |
I see no reason not to use the method ( @aleclarson are you up for implementing this in a PR? |
I'm not familiar with the architecture, and have no time to learn it currently. 😢 |
Alright, anyone else? @connec ? |
Okay, I'm trying to see how this could be done, but it seems like I haven't been able to test it out or see how it would get compiled in the context of an object. |
I think |
Here's where I'm at right now: https://gist.github.com/joallard/ff34ca6c31db0db7f214d4c199d6ebec There seems to be a bad infinite-loop bug with |
So first off, you want to be editing |
The edit to the .coffee is below in the diff |
@GeoffreyBooth Yes, of course, but I preferred editing nodes.js directly and test than nodes.coffee, then rebuild, wait, then test. I read the wiki post forwards and backwards, but there's not much currently on the workflow, I've had to hack things and figure them out. I still can't manage (or have invested the time) to break out a Repl in the middle of code, so I'm down to console-logs. I'll try to add some contrib-workflow tips to the wiki with the things I've learned along the way. But obviously, a PR wouldn't be so hacky. |
Sorry I didn't look closer. You might want to review https://github.com/jashkenas/coffeescript/wiki/%5BHowTo%5D-How-parsing-works, that provides an overview. Getting debugging working in Node is well worth the time. Basically create a
And open Chrome DevTools and connect to the Node debugger. You can step through Node code the same as using DevTools for frontend code. |
As seen on MDN.
The
obj2
variable would transpile to:The text was updated successfully, but these errors were encountered: