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

"Blank line" in newline token detection doesn't take into account comments #7434

Open
scabug opened this issue Apr 29, 2013 · 2 comments
Open

Comments

@scabug
Copy link

scabug commented Apr 29, 2013

A blank line in a comment can cause a syntax error, as it triggers the differentiation between NEWLINE and NEWLINES tokens. For example, this is allowed:

@tailrec
/*
 Comment 1
 Comment 2
 */
def foo: Int = ???

But this gives a syntax error:

@tailrec
/*
 Comment 1
 
 Comment 2
*/
def foo: Int = ???

It might be better if blank lines within comments weren't taken into consideration.

@scabug
Copy link
Author

scabug commented Apr 29, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7434?orig=1
Reporter: Matt Russell (mattrussell)
Affected Versions: 2.10.1

@scabug
Copy link
Author

scabug commented Jan 2, 2014

Jan Niehusmann (jannic) said:
See also #5740 (and the comments to that issue)

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

No branches or pull requests

2 participants