libexpr: support :doc for nixpkgs lambdas#9054
Conversation
| }); | ||
| } | ||
|
|
||
| \/\*([^*]|\*+[^*/])*\*+\/ { |
There was a problem hiding this comment.
doc-comments per rfc145 start with /** */, but this is nice though for testing against nixpkgs.lib
| PosTable::Origin origin; | ||
| std::optional<ErrorInfo> error; | ||
| std::vector<Comment> comments; | ||
| std::map<nix::Expr *, Comment> attachedComments; |
There was a problem hiding this comment.
if Comments is a vector, does this mean there can be multiple comments attached to one expr?
We could simplify here because doc-comments are multiline comments only und thus only this is a one-to-one relation
8055ecd to
dcef056
Compare
dcef056 to
049aaba
Compare
|
Note: this PR is not ready to merge but I want to let the nix team review this approach. It is attaching expressions in the semantic action to Currently we have many POC impls of NixOS/rfcs#145.
We need to access the buffer if it is needed to check whitespaces, the RFC specified that there are only whitespaces allowed between comments & expression. What is the correct way to do such thing? Footnotes
|
Motivation
This is a proof-of-conecpt PR that implements NixOS/rfcs#145. (lambdas only, but we can easily add more types.)
Currently it can display functions like
lib.isList,lib.idContext
Related-to: #5527 #1652
Fixes: #3904
Link: NixOS/rfcs#145
Priorities
Add 👍 to pull requests you find important.