diff --git a/crates/nu-parser/src/parser.rs b/crates/nu-parser/src/parser.rs index c927a16d41388..a80dfb341d236 100644 --- a/crates/nu-parser/src/parser.rs +++ b/crates/nu-parser/src/parser.rs @@ -2743,7 +2743,6 @@ pub fn parse_shape_name( b"signature" => SyntaxShape::Signature, b"string" => SyntaxShape::String, _ if bytes.starts_with(b"table") => parse_collection_shape(working_set, bytes, span), - b"variable" => SyntaxShape::Variable, b"var-with-opt-type" => SyntaxShape::VarWithOptType, _ => { if bytes.contains(&b'@') { diff --git a/crates/nu-protocol/src/syntax_shape.rs b/crates/nu-protocol/src/syntax_shape.rs index f2447cb85c277..58cdf23f6a4cf 100644 --- a/crates/nu-protocol/src/syntax_shape.rs +++ b/crates/nu-protocol/src/syntax_shape.rs @@ -110,9 +110,6 @@ pub enum SyntaxShape { /// A table is allowed, eg `[[first, second]; [1, 2]]` Table(Vec<(String, SyntaxShape)>), - /// A variable name, eg `$foo` - Variable, - /// A variable with optional type, `x` or `x: int` VarWithOptType, } @@ -164,7 +161,6 @@ impl SyntaxShape { SyntaxShape::String => Type::String, SyntaxShape::Table(columns) => Type::Table(mk_ty(columns)), SyntaxShape::VarWithOptType => Type::Any, - SyntaxShape::Variable => Type::Any, } } } @@ -226,7 +222,6 @@ impl Display for SyntaxShape { SyntaxShape::Operator => write!(f, "operator"), SyntaxShape::RowCondition => write!(f, "condition"), SyntaxShape::MathExpression => write!(f, "variable"), - SyntaxShape::Variable => write!(f, "var"), SyntaxShape::VarWithOptType => write!(f, "vardecl"), SyntaxShape::Signature => write!(f, "signature"), SyntaxShape::MatchPattern => write!(f, "match-pattern"),