-
Notifications
You must be signed in to change notification settings - Fork 38
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 syntax #109
Comments
Thank you very much, that's great.
Well, more or less. I think there still is room for discussion and We already have README files. These are particularly great because they Then we have the usage examples. These have the benefit of producing Finally we have the "metadata" - the information stored in the In a nutshell: We have to identify the places where such documentation
Yes.
I agree with that because that will allow a consistent interface for
Yes, the modified block comment should be the way to go. And in addition we have to discuss which "fields" these comments support
This would of course be terrific! |
I tried to implement this proposal using python-ly without success, and it took me much longer than the couple of days I initially planned :-) The approach I was trying to use was to extend the parsers provided by python-ly to recognize the documentation syntax. However I found it difficult to develop a parser that could distinguish between top-level name declarations preceded by documentation comments from other combinations of words with the Another route to explore may be to use a parser generator the takes as input a grammar, like grako. Unfortunately, this is something that I will not be able to do in the short term, but we can add it to our to-do list for the future :-) |
I have now discussed the issue of block comments in The approach should be to read the file, and when such a comment is encountered read that and "apply" it to the next definition. I think the number of possible cases following such a doc comment is sufficiently small to be handled properly. Within Next thing to discuss would be the selection of supported "fields" and a proper syntax that is at the same time good to write, read, and parse. |
I'm opening this issue to start the discussion on documentations syntax. I think that there are three kinds of documentation:
Of the above list, the first two items are already in place. As per the API documentation, I see two possible ways to embed it into source files:
In my opinion, the first approach is better in our case, since it will allow to annotate
registerOption
invocations, so to document options defined modules.Lilypond already has block comments, delimited by
%{ %}
. I propose to use marked block comments for documentation:Notice the
!
in the documentation comment to distinguish it from a normal block comment.I am working on the implementation of a parser with
python-ly
to parse such comments. I should have a preliminary version ready for the week-end. However, I'd like to know your ideas about the documentation syntax.The text was updated successfully, but these errors were encountered: