-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
New doc syntax #11836
New doc syntax #11836
Conversation
Cool! Just giving this a try now. Some results: At the REPL triplequoted strings work fine for methods:
Single quotes don't yet, they probably should:
I've not had any luck getting a source file documented yet. This gist contains some test cases that should probably be supported. Where should the docs end up? |
Switching all the docstrings in the gist to
@doc """F""" ->
function F end
@doc """B""" ->
bitstype 8 B
The inner constructor @doc """C_1""" ->
C(x) = new() produces
I can open separate issues for each of these, but perhaps it's best to just put the fixes in here and now? |
👍 thanks for doing this |
Yeah so the doc macro is a little out of date for some of the newer 0.4 features, I think there are separate issues open for that. I think the module thing isn't working because technically you're no longer at the top level inside a module. So I just need to patch the part that parses modules too. |
- only operates at top level or directly inside a module - parses just a string at the end of input - doesn't change string literal parsing (e.g. interpolation can still happen) - any string or prefixed string can be a doc string
👍 🎉 |
👍 |
I'm sure this implementation is far from acceptable (aesthetically and as far as the tests are concerned) but hopefully the core idea is sound. I've used the new syntax for the
include
doc string for illustration, and as you can easily verify fromBase.DocBootstrap.docs
the plain docstrings we already have are successfully stored, even before the doc system itself is in place (although we don't process these just yet).(@Keno @ViralBShah apologies that this is four hours late)