1
0
mirror of https://github.com/nushell/nushell.git synced 2025-06-14 05:57:13 +02:00
Ian Manske 6ccd547d81
Add ListItem type for Expr::List ()
# Description
This PR adds a `ListItem` enum to our set of AST types. It encodes the
two possible expressions inside of list expression: a singular item or a
spread. This is similar to the existing `RecordItem` enum. Adding
`ListItem` allows us to remove the existing `Expr::Spread` case which
was previously used for list spreads. As a consequence, this guarantees
(via the type system) that spreads can only ever occur inside lists,
records, or as command args.

This PR also does a little bit of cleanup in relevant parser code.
2024-04-18 13:21:05 +02:00
..
2024-04-12 08:00:43 -05:00