Skip to content
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 #2538

Closed
steida opened this issue Sep 8, 2012 · 5 comments
Closed

Inline block comments #2538

steida opened this issue Sep 8, 2012 · 5 comments

Comments

@steida
Copy link

steida commented Sep 8, 2012

Javacript supports inline block comments.

var foo = /** @type {number} */ (this.getFoo())

CoffeeScript seems to not support such syntax.

foo = ###* @type {number} ### (@getFoo())
@jashkenas
Copy link
Owner

Yep -- it doesn't. Because we need to be able to parse and pass through block comments to the corresponding JS, you generally aren't allowed to use them in places where an expression wouldn't be allowed. See previous tickets.

We'd be glad to take a fix that passes them through universally, but we don't know of an implementation.

@michaelficarra
Copy link
Collaborator

Parsing for in-line block comments is fixed in redux, I just need to add the (gross, side-effecting) logic to append comments to the following node.

@jashkenas
Copy link
Owner

Excellent.

@michaelficarra
Copy link
Collaborator

off-topic: @jashkenas: I've made a fixed in redux tag and tagged the open issues that are fixed by my compiler.

@GeoffreyBooth
Copy link
Collaborator

foo = ###* @type {number} ### (@getFoo())

compiles now via #4572. Sorry it took awhile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants