Skip to content

parser: fix formatting struct decl with comments (fix #20202) - #20207

Merged
spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fix_fmt_struct_decl
Dec 18, 2023
Merged

spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fix_fmt_struct_decl

Conversation

@yuyi98

@yuyi98 yuyi98 commented Dec 18, 2023

Copy link
Copy Markdown
Member

This PR fix formatting struct decl with comments (fix #20202).

  • Fix formatting struct decl with comments.
  • Add test.
struct ABC  //size: 0x1=1 (source) (123 45 67) 20B
{
        ff[0x20]                u8
}

fmt to:

struct ABC { // size: 0x1=1 (source) (123 45 67) 20B
	ff [0x20]u8
}

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work.

@spytheman
spytheman merged commit a8e0ced into vlang:master Dec 18, 2023
@yuyi98
yuyi98 deleted the fix_fmt_struct_decl branch December 19, 2023 00:53
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.

vfmt fail with comment

2 participants