Add a simple scope variable

This commit is contained in:
JT
2021-11-02 16:08:05 +13:00
parent 3c1b3473ae
commit d856cebebd
8 changed files with 204 additions and 47 deletions

View File

@ -1198,7 +1198,17 @@ pub fn parse_variable_expr(
} else if contents == b"$nu" {
return (
Expression {
expr: Expr::Var(0),
expr: Expr::Var(nu_protocol::NU_VARIABLE_ID),
span,
ty: Type::Unknown,
custom_completion: None,
},
None,
);
} else if contents == b"$scope" {
return (
Expression {
expr: Expr::Var(nu_protocol::SCOPE_VARIABLE_ID),
span,
ty: Type::Unknown,
custom_completion: None,