Skip to content

Commit 6b5fd63

Browse files
committed
fix null
1 parent 7c8e084 commit 6b5fd63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/nu-parser/src/parser.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5231,6 +5231,10 @@ pub fn parse_value(
52315231
_ => {}
52325232
}
52335233

5234+
if bytes == b"null" {
5235+
return Expression::new(working_set, Expr::Nothing, span, Type::Nothing);
5236+
}
5237+
52345238
match shape {
52355239
SyntaxShape::Number => parse_number(working_set, span),
52365240
SyntaxShape::Float => parse_float(working_set, span),
@@ -5307,9 +5311,6 @@ pub fn parse_value(
53075311
b"false" => {
53085312
return Expression::new(working_set, Expr::Bool(false), span, Type::Bool);
53095313
}
5310-
b"null" => {
5311-
return Expression::new(working_set, Expr::Nothing, span, Type::Nothing);
5312-
}
53135314
b"-inf" | b"inf" | b"NaN" => {
53145315
return parse_float(working_set, span);
53155316
}

0 commit comments

Comments
 (0)