-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add support for documentation comments #624
base: master
Are you sure you want to change the base?
Add support for documentation comments #624
Conversation
9b9f163
to
e992c7e
Compare
61f0067
to
283dc2f
Compare
In preparation for @BinderDavid's #624, I went through the stdlib and tried to change doc comments to use `///` :)
@b-studios, I took a look at how to continue, and the biggest problem I could see is that when we'll need two different annotations. Is there a better way? We could also store the DocComment on the AST node of a declaration, but I remember you were somewhat opposed to this. Or should we somehow keep only the WDYT? object Annotations {
// ... existing annotations ...
type DocComments = Vector[String]
/**
* Documentation comments for symbols such as functions, types, effects etc.
* Stores multiple doc comments in order of appearance.
*/
val Documentation = Annotation[symbols.Symbol, DocComments](
"Documentation",
"documentation comments associated with"
) |
Will we only have doc comments on things that are symbols? If yes, then we can always go from tree to symbol and only store ah... there is a hole in my reasoning. This will only be possible after Namer... |
Maybe easiest to store it in the tree, but I have to see how this looks and whether this is too annoying when doing source to source rewritings. |
Part of the solution to #325