Skip to content

parser, fmt: fix formatting interface method with pre-comments (related #18980)#18998

Merged
spytheman merged 1 commit intovlang:masterfrom
yuyi98:fix_fmt_interface_method_comments
Jul 29, 2023
Merged

parser, fmt: fix formatting interface method with pre-comments (related #18980)#18998
spytheman merged 1 commit intovlang:masterfrom
yuyi98:fix_fmt_interface_method_comments

Conversation

@yuyi98
Copy link
Copy Markdown
Member

@yuyi98 yuyi98 commented Jul 28, 2023

This PR fix formatting interface method with pre-comments (related #18980).

  • Fix formatting interface method with pre-comments.
  • Add test.

vlib\v\fmt\tests\interface_method_with_pre_comments_keep.vv

module main

fn main() {
}

pub interface IOperateResult {
mut:
	// is_success
	is_success bool
	// is_show_msg
	is_show_msg bool
	// msg
	msg string
	// comment before method def
	set_msg(msg string) // comment after method def
}

@spytheman spytheman merged commit 112a127 into vlang:master Jul 29, 2023
@yuyi98 yuyi98 deleted the fix_fmt_interface_method_comments branch July 29, 2023 13:23
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