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

ast, parser, fmt: fix formatting struct declaration with comments (fix #18982) #18992

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Jul 28, 2023

This PR fix formatting struct declaration with comments (fix #18982).

  • Fix formatting struct declaration with comments.
  • Add test.

vlib\v\fmt\tests\struct_decl_with_comments_keep.vv

module main

fn main() {
}

pub struct OperateInfo { // implements IperateInfo
pub mut:
	title string // title
	// msg
	msg string
	// id
	id string
} // operate info

doc/docs.md Outdated Show resolved Hide resolved
Copy link
Member

@spytheman spytheman left a comment

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 2f2dde8 into vlang:master Jul 28, 2023
48 checks passed
@yuyi98 yuyi98 deleted the fix_fmt_struct_decl_comments branch July 29, 2023 13:22
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.

fmt error 3
2 participants