This commit primarily introduces the ability to parse custom types and
type aliases. The tests for these constructs are contained in the
subsequent commit, because they were written against the "cleaned up"
AST.
Types for constants are more restricted than types for other parts of
the language. The way that the Gleam parser handles this is by having
the `parse_type` function pass along a `for_const` boolean, which is
used to limit valid subnodes. I tried replicating this functionality in
tree-sitter by creating a `parse_type($, for_const)` function, and
calling that instead of `$.type`. tree-sitter did not like this, saying
that the call stack became too deep.
Thus, I arrived at my current solution, which is simply to have
largely duplicate type rules for constants vs not-constants.
Another possible approach would be to _generate_ the type rules via a
`gen_types($, for_const)` function, which could be embedded into the
rules list like so:
```
/* Special constant types */
...gen_types($, true),
// other stuff
/* Types */
...types($, false),
```
I may try that later.