Skip to content

Commit

Permalink
Refactor docsystem internals
Browse files Browse the repository at this point in the history
Structure of a module's `#meta` dict now has the following layout in
all cases (with the exception of keywords):

- each module's `#meta` `ObjectIdDict` has keys of type `Binding` and
  values of type `MultiDoc`.
- each `MultiDoc` stores a collection of `DocStr` objects representing a
  single docstring each. These are ordered based on their order of
  definition rather than the current `type_morespecific` approach.
- `DocStr`s store the raw text of a docstring and lazily parse this to a
  `Markdown.MD` object when requested. By not parsing every docstring we
  also make some space savings in the `sys.*` files.

By keying `#meta` by `Binding` in every case the rest of the logic in
`doc!` and `doc` becomes a lot more straightforward. `at-doc` expression
building has also been simplified.

Additionally, the "summaries" displayed when no documentation can be
found have been refactored and simplified.
  • Loading branch information
MichaelHatherly committed Feb 29, 2016
1 parent 9cda4ab commit dfc6941
Show file tree
Hide file tree
Showing 6 changed files with 344 additions and 373 deletions.
Loading

0 comments on commit dfc6941

Please sign in to comment.