-
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
Inline block comments can introduce unwanted commas in a function parameter list #769
Comments
Would compiling without extra commas suffice, or should we go multiline in this case: |
Didn't there used to be restrictions about where you could put a block comment? Right now they're just expressions which means they can be used just about anywhere with all sorts of funny effects. |
Thinking out loud, but can the
It may actually be a pain to update the Another possible implementation would be to pass on the comment in the Just my thoughts, anyway. |
I started implementing exactly that a few hours ago, but only in specific places, where it made sense. I got tired of wrestling with the grammar though. I might go back and have another crack at it after I get some sleep. |
Stan's approach has always been the most appealing tactic in theory -- but in practice, it seems quite difficult. Almost every line of It sounds great, but I think I'll believe it when I see it in action ... is what I'm saying. |
OK... mmm... zaach added an option to support error recovery in Jison. I recall experimenting with it, but not exactly what I did. My thinking is -- can a rule be produced which says Long shot at best... |
Nah, error handling is just as difficult an approach as comment-tagged nodes, with no benefit. |
Tesco: I noticed your branch where you make Comments Lines instead of Expressions ... how's that working out for you? |
It's not. Comments are fundamentally broken at the moment, I need to take about a day to redo their logic. |
|
Inline block comments that aren’t treated as expressions happens now via #4572. Sorry it took awhile. |
Please see http://gist.github.com/624272
I was trying to caffeinate some JS of the form
callThisFunction( /* block comment here */ firstArgument)
but my compiled JS output came out looking like
callThisFunction( /* block comment here */, firstArgument)
.Note the extra comma.
The text was updated successfully, but these errors were encountered: