mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 07:11:29 +02:00
Add stepping to ranges & enable reverse ranges
Follows the following syntax: <start>..<next-value>..<end>
This commit is contained in:
@@ -7,8 +7,9 @@ pub enum Expr {
|
||||
Int(i64),
|
||||
Float(f64),
|
||||
Range(
|
||||
Option<Box<Expression>>,
|
||||
Option<Box<Expression>>,
|
||||
Option<Box<Expression>>, // from
|
||||
Option<Box<Expression>>, // next value after "from"
|
||||
Option<Box<Expression>>, // to
|
||||
RangeOperator,
|
||||
),
|
||||
Var(VarId),
|
||||
|
@@ -59,6 +59,7 @@ pub enum RangeInclusion {
|
||||
pub struct RangeOperator {
|
||||
pub inclusion: RangeInclusion,
|
||||
pub span: Span,
|
||||
pub next_op_span: Span,
|
||||
}
|
||||
|
||||
impl Display for RangeOperator {
|
||||
|
Reference in New Issue
Block a user