Skip to content
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

Documentation File Generation #19

Open
iwillspeak opened this issue Sep 15, 2021 · 3 comments
Open

Documentation File Generation #19

iwillspeak opened this issue Sep 15, 2021 · 3 comments
Labels
feature New feature or request

Comments

@iwillspeak
Copy link
Owner

It would be nice to generate .xml style docs for our libraries. An example format for these comments in Scheme is SchemeDoc: http://people.cs.aau.dk/~normark/schemedoc/

see also monodocer: https://www.mono-project.com/docs/tools+libraries/tools/monodoc/generating-documentation/

@iwillspeak iwillspeak added the feature New feature or request label Sep 17, 2021
@iwillspeak
Copy link
Owner Author

One approach here would be to start tracking whitespace as "trivia" tokens. When binding a tree and we encounter a define form we can look in the leading trivia for documentation comments.

Generally speaking tokens collect all the leading trivia since the last token, and trailing trivia until the end of the line. Not sure how easy this will be to achieve with FParsec.

@iwillspeak
Copy link
Owner Author

Mono.Cecil.Rocks seems to haver some types to aid in generating the documentation names that would be needed for this:

https://github.com/jbevain/cecil/blob/master/rocks/Mono.Cecil.Rocks/DocCommentId.cs

@iwillspeak
Copy link
Owner Author

We don’t have enough trivia information in the current tree to properly support this. Hopefully switching to full fidelity concrete trees will solve the problem by including trivia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant