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

Allow declarations that start with a multiline comment #82

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

alex-pinkus
Copy link
Owner

The semi-suppressor is a little too aggressive: if it sees something
like:

class Foo {
    let property1: String

    /* visible for testing */ var property2: String
}

It will suppress the newlines before property2 and cause compilation
to fail. If the comment were on its own line, it would be fine, because
there's still another semi in the way.

The best way to fix this seems to be to allow multiline comments
themselves to count as separators.

The semi-suppressor is a little too aggressive: if it sees something
like:

```
class Foo {
    let property1: String

    /* visible for testing */ var property2: String
}
```

It will suppress the newlines before `property2` and cause compilation
to fail. If the comment were on its own line, it would be fine, because
there's still another semi in the way.

The best way to fix this seems to be to allow multiline comments
themselves to count as separators.
@alex-pinkus alex-pinkus force-pushed the declarations-multiline-comment branch 2 times, most recently from b36d7ec to 74047c3 Compare December 31, 2021 22:08
@alex-pinkus alex-pinkus merged commit efc9d5e into main Dec 31, 2021
@alex-pinkus alex-pinkus deleted the declarations-multiline-comment branch December 31, 2021 22:16
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.

1 participant