Closed huwaireb closed 1 year ago
In the early days of the wit format, we talked about ensuring that doc comments could be properly translated into the right format for all languages we'd want to generate bindings for, including the right structure for parameter documentation, examples, etc. Doing that would require us to not treat comments as whitespace, and instead add their internal structure to the grammar, I think.
@tschneidereit I fully understand, I looked over how wit-bindgen and the wit-related projects by bytecodalliance function to get a better understanding
This is why I left only comments as white-space and kept doc-comments (there's two non-terminals, doc-comments being separated from comments).
However, as doc-comments can still be accessed from the CST, I'm leaving adding the doc-comments nonterminal to whitespace up to others.
This looks mergable to me. @tschneidereit, did @r-muhairi's reply make sense to you?
@lukewagner I've rebased the PR, as long as everything is okay this should be fine.
Oops, sorry for letting this drop. Thanks for the rebase and reminder!
154
Question:
Minor Note: I replaced the EBNF grammar block's language from WIT -> EBNF, as github supports EBNF for syntax highlighting