Skip to content

block comments inside conditional bodies #934

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
michaelficarra opened this issue Dec 15, 2010 · 3 comments
Closed

block comments inside conditional bodies #934

michaelficarra opened this issue Dec 15, 2010 · 3 comments

Comments

@michaelficarra
Copy link
Collaborator

two tests that need to pass and are currently failing (to parse)

test 1:

eq undefined, (if true
  ###
  block comment
  ###
else
  # comment
)

test 2:

eq undefined, (if false
  # comment
else if true
###
block comment
###
else)
@StanAngeloff
Copy link
Contributor

I reckon the smart thing to assume is good programmers don't need comments in code so we can completely skip these cases and pretend everything's dandy.

@odf
Copy link

odf commented Dec 16, 2010

@StanAngeloff: Agreed, programming languages need to be more proactive when it comes to educating coders. I propose the compiler message to be: "Dude, gross! Refactor that stuff."

@jashkenas
Copy link
Owner

That second test shouldn't be valid (until we change our block comment handling in general) ... because of significant indentation. But the first one is now fixed, here:

76e11e6

... closing the ticket.

stephank pushed a commit to stephank/coffee-script that referenced this issue May 14, 2011
This issue was closed.
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