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
Doc comments #4140
Comments
I look forward to doc comments in the AST. I am working on some code to generate HTML documentation from a |
Sure - depending on how it is written it could be maintained in this repo as well. Would you be up for doing it in rust? |
Yes, it is written in Rust, and my intention is for it to be in this repo and part of the |
It will probably have a bunch of HTML-related dependencies that we probably don't as dependencies of the prqlc. Could it be a separate binary? |
Yes, it could be a separate binary, however right now it doesn't have any dependencies at all, the HTML is just a string in Rust. Like: let mut html = String::new();
html.push_str("<html>");
html.push_str("</html>"); |
Ah, ok that makes sense - I like your approach of making the initial version simple before adding too much dependencies. It can easily be part of prqlc then! Do you need any help with integrating with prqlc CLI? |
I created a PR at #4152, yes I would like some help integrating t with the prqlc CLI. |
Followup for discussion #4110
Bottom line is that this will be the syntax for documentation comments:
#. doc comment
for the next statement#! doc comment
for the parent module@annotation
for the next statement@!annotation
for the parent statementAs with annotations, doc comments can attach to any statements (variables, types, modules) and will be available in the AST. We can make a tool that extracts this information and converts it to HTML, so it can be published somehow.
ATM, this would be most useful with
std.prql
module, which would benefit from exposing a bit more documentation (especially with arithmetic functions).I would ask to refrain bike-shedding the syntax, unless there is a serious concern about usability.
The text was updated successfully, but these errors were encountered: