Skip to content

correct placed comments have effects on the compilation process #2445

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

Closed
nomoral opened this issue Jul 17, 2012 · 6 comments
Closed

correct placed comments have effects on the compilation process #2445

nomoral opened this issue Jul 17, 2012 · 6 comments

Comments

@nomoral
Copy link

nomoral commented Jul 17, 2012

hello

the following code does not compile:

$("body").on "namespace-" + event,
    ###
     <|line: 19|> 
    ###
    () -> handler()

but the following does:

$("body").on "namespace-" + event,
    () -> handler()

the idea of comments (my interpretation) is that they are separated from the code.
they are like removed from the code leaving no effect.

@goto-bus-stop
Copy link

Block comments aren't, in CoffeeScript.

@michaelficarra
Copy link
Collaborator

See #2025 and many, many others.

@erisdev
Copy link

erisdev commented Jul 17, 2012

I think block comments should be removed from the language. They are the source of a lot of erroneous "bug" reports like this one and are honestly kinda hard to use.

@michaelficarra
Copy link
Collaborator

@erisdiscord: Not removed, but made into actual comments. They should be thrown out at the lexer/preprocessor phase.

@nomoral
Copy link
Author

nomoral commented Jul 17, 2012

@michaelficarra: yes, thats exactly how i think
a comment should not have any side effects and be invisible to the compiler
to write a comment on the output javascript you can use a special function or something else that is not called "comment"

@GeoffreyBooth
Copy link
Collaborator

This is fixed 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

5 participants