These were referred to by other parts of the documentation, and they
provide core parts of our functionality, so we should have explicit
documentation for them.
This commit mostly focuses on f-strings, collections, comprehensions,
and subscripts/slices.
I added intersphinx support to the sphinx config so I could link to
`ast.literal_eval`.
I exported BaseSimpleComp, since I felt it had some documentation value.
I haven't gone through every expression and cleaned it up yet, but I
have completed the `Names and Object Attributes`, `Operations and
Comparisons`, `Control Flow`, and `Lambda and Function Calls` sections,
as well as part of the `Literal Values` section.
Groups the expression nodes into much smaller subcategories for improved
readablility.
Some nodes defined in the expression module were grouped with statements
because they made more sense there (from a documentation perspective).
This also adds a local table of contents to the top of the nodes page
which better reveals all of the subcategories.
It also exports and categorizes
`BaseAssignTargetExpression`/`BaseDelTargetExpression`. These nodes were
referenced in type annotations of other nodes, so they need to be
exported if only for documentation reasons.
I added this originally because it's part of Python's grammar, but since
we merged parenthesis and friends into expressions instead of forming
separate nodes, BaseAtom doesn't have much use.
This fixes also a few bugs:
- A decorator requires a `dotted_name`, so it can only take a `Name` or
an `Attribute` node, not any atom.
- A `Call` node's function can be any expression, not just a fixed list
of `BaseExpression` subclasses.
- Now that we're exporting everything from the top-level libcst package,
automodule makes a mess of things.
- While it does create more boilerplate, using autoclass/autofunction
instead of automodule gives us a lot more control over the order in
which nodes are presented, so we can group them by various categories.
This diff also exports BaseParenthesizableWhitespace, because nodes
refer to it by type, and so it's needed for documentation purposes.