Skip to content

Fix bugs in comments. #4912

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

Merged
merged 4 commits into from
Sep 10, 2018
Merged

Fix bugs in comments. #4912

merged 4 commits into from
Sep 10, 2018

Conversation

chriseth
Copy link
Contributor

@chriseth chriseth commented Sep 5, 2018

This fixes several bugs with regards to line breaks and comments:

  • any unicode line break (line feed, vertical tab, form feed, carriage
    return, NEL, LS and PS) is considered to terminate a single-line
    comment. The line break itself is considered to be the next token
    after the comment, leading to a parser error if it is not an
    ascii character (i.e. for NEL, LS and PS).
  • unterminated multiline comments are considered illegal tokens
  • '/** /' is considered an unterminated multiline comment
    (previously, whitespace was allowed before the last '/'

Fixes #4885

To do:

  • changelog entry
  • tests

@codecov

This comment has been minimized.

@chriseth chriseth changed the title [WIP] Refactor handling of whitespace. Fix bugs in comments. Sep 6, 2018
 - any unicode line break (line feed, vertical tab, form feed, carriage
   return, NEL, LS and PS) is considered to terminate a single-line
   comment. The line break itself is considered to be the next token
   after the comment, leading to a parser error if it is not an
   ascii character (i.e. for NEL, LS and PS).
 - unterminated multiline comments are considered illegal tokens
 - '/** /' is considered an unterminated multiline comment
   (previously, whitespace was allowed before the last '/'
@chriseth chriseth requested review from axic and ekpyron September 6, 2018 14:48
@chriseth chriseth merged commit 255eda2 into develop Sep 10, 2018
@axic axic deleted the fixNewline branch September 26, 2018 21:36
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

Successfully merging this pull request may close these issues.

Handling of Newlines in comments
2 participants