DocStringExtensions.jl
DocStringExtensions.jl copied to clipboard
Add support for default values to `TYPEDSIGNATURES`
This is done by making TypedMethodSignatures
interpolatable and giving it the Expr of the thing the docstring is bound to. From the AST we can parse each arguments name, type annotation, default value, and whether or not it's variadic. Currently only the default value is used in TYPEDSIGNATURES
, though in the future it might be an idea to use the type information as well.
I think this could do with some more tests (parsing is hard :cry:), but it's pretty close to being complete. Fixes #107, fixes #19. Would make #97 possible if we're ok with getting the types from the AST.