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

Improved handling of comments around clauses/stanzas #89

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

jaybosamiya-ms
Copy link
Collaborator

With this PR, each comment now maintains loyalty to the clause the user picked it to stay with, rather than automatically migrating to the previous clause in the presence of assert ... by { ... }-style constructs.

See the newly introduced test which would fail before this PR.

Copy link
Contributor

@parno parno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Thanks for the detailed comment in verus.pest

Specifically, in the presence of comments around `expr_with_block`
cases (such as `assert ... by { ... }` blocks) that don't necessarily
have a semicolon, the previous version would end up reorganizing the
affinity of the comments across the clauses, preferring the previous
clause. With this commit, each comments stays loyal to its own clause.
@jaybosamiya-ms jaybosamiya-ms merged commit da59e94 into main Sep 24, 2024
8 checks passed
@jaybosamiya-ms jaybosamiya-ms deleted the jb-commented-clause branch September 24, 2024 16:58
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.

2 participants