Skip to content

Support single line comments of the form // comment#2254

Merged
chenglou merged 2 commits intoreasonml:masterfrom
IwanKaramazow:SingleLineComments
Nov 13, 2018
Merged

Support single line comments of the form // comment#2254
chenglou merged 2 commits intoreasonml:masterfrom
IwanKaramazow:SingleLineComments

Conversation

@IwanKaramazow
Copy link
Copy Markdown
Contributor

Implements parsing & printing of single line comments.

Example:

// single line comment
let x = 1;

The main logic is taken from #1800.
Extra test cases and support for whitespace interleaving have been implemented.

Comment thread formatTest/unit_tests/expected_output/basicStructures.re Outdated
Comment thread formatTest/unit_tests/input/basicStructures.re Outdated
@IwanKaramazow IwanKaramazow force-pushed the SingleLineComments branch 2 times, most recently from 780b19e to d7ac64a Compare November 3, 2018 11:00
```reason
let x = {
  //
};
```

If the { }-sequence didn't break we would get parse error:

```reason
let x = { // };
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants