Skip to content

Fix formatting of comments after statements without semicolons - #311

Open
jgardn3r wants to merge 1 commit into
integrated-application-development:masterfrom
jgardn3r:fix-trailing-comments
Open

Fix formatting of comments after statements without semicolons#311
jgardn3r wants to merge 1 commit into
integrated-application-development:masterfrom
jgardn3r:fix-trailing-comments

Conversation

@jgardn3r

@jgardn3r jgardn3r commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

This fixes #243.

@jgardn3r
jgardn3r requested a review from fourls August 7, 2026 01:33
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
core/src/defaults/parser.rs 97.91% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread core/src/defaults/parser.rs
Comment on lines +512 to +519
_ |begin
_1 | if A then{1}
_^1 | A := B + C
_^1 | //
_1 | else{2}
_^2 | B := C + D
_ | //
_ |end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's odd for this single-line then statement to cause the subsequent comment to be indented as if within the block. For consistency with the other single-line statements (for, else, while, etc.) it should be indented to the outer scope, e.g.:

Suggested change
_ |begin
_1 | if A then{1}
_^1 | A := B + C
_^1 | //
_1 | else{2}
_^2 | B := C + D
_ | //
_ |end
_ |begin
_1 | if A then{1}
_^1 | A := B + C
_^1 | //
_1 | else{2}
_^2 | B := C + D
_ | //
_ |end

@jgardn3r
jgardn3r force-pushed the fix-trailing-comments branch from 609a115 to fe6aa83 Compare August 10, 2026 02:51
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.

The code formatting of assignments and double-slash comments is not aligned

2 participants