-
Notifications
You must be signed in to change notification settings - Fork 46
fix(wit-grammar) handle inline comments #1117
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
Conversation
|
getting some strange logic for newline separations, @Xophmeister any thoughts? |
The preserved blank line on L4 makes sense. You have the blank in the input and you have On L20-21 in the input (L18-19 in the output): you have a (
[
(export_item)
(func_item)
(import_item)
(include_item)
(interface_item)
(package_decl)
(resource_item)
(type_item)
(resource_method)
(since_gate)
(deprecated_gate)
(unstable_gate)
] @append_spaced_softline
.
[
(block_comment)
(line_comment)
]* @do_nothing
)I guess those (body
.
"{" @append_hardline @append_indent_start @prepend_space
_
"}" @append_hardline @prepend_hardline @prepend_indent_end
.
) @append_hardlineI'm pretty sure the two |
|
@Xophmeister I've addressed all the issues (thanks to your feedback!) except for the world one & two (tried every which way, something else is conflicting) but I don't want to hold up the release, this can be fixed afterwards (the double newline separation after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Handle inline comments and trailing commas in WIT
Description
This PR handles trailing commas for newline delimited sections and inline comments for WIT
Checklist
Checklist before merging, wherever relevant:
CHANGELOG.mdupdatedREADME.md, etc.) up-to-date