Added generation of tables of attributes of classes, structs, and str… #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…uct slots.
Adds generation of tables of attributes for structs, classes, and struct slots just like #23 added such a table for class slots; now that eudoxia0/docparser collects these attributes. Note, the PR makes it so that codex will work fine with older versions of docparser as well as the new. It has lots of
(when (fboundp 'docparser::class-node-metaclass) ...
like constructs to only use the new features of docparser if available. The::
is necessary in the symbols because otherwise, if using an old docparser version, the code can't compile and load because the symbol isn't exported.Struct slot attributes are shown in the following order:
Class attributes are shown in the following order:
And struct attributes are shown, if it is even possible to get them, in the following order:
You will note that
:include
is not yet included. I am not sure what the best way to show that one is. Listing the name of the struct that it inherits from is easy. But I am not sure what the best way to handle the slot overrides is. One possibility would be to convert the slot nodes for the overrides back to a list and then have them one by one on their own line in the cell on the right hand side of the table. Thoughts?However, there are a few catches, the second of which is a very big one that must be considered.
For classes, the superclass was already listed due to #22. That is now put into the table.
The CSS in templates/static/nodes.css is a BIG ONE. Previously, there were was a CSS entry for the
codex-superclass-list
and then lots of CSS entries for the tables but they were class slot specific in that they all have the prefixcodex-class-slot-option-
. This PR gets renames them to use thecodex-class-struct-slot
prefix to make them generic for all attribute tables and got rid of the superclass specific one (nowcodex-class-struct-slot-option-symbol-list-cell
is used). This does break backwards comparability to some degree, so it must be considered very carefully. One simple way to improve the compatibility would be to keep the old prefixes and just use them for the new tables even though their name isn't completely accurate (the PR can be easily fixed to do this).