mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 01:15:14 +02:00
Add parser improvements (#2679)
* Add parser improvements Previously everything starting with "$" was parsed as a column path. With this commit applied, the lite_arg starting with $ is parsed as the most appropriate thing - $true/$false ==> Expression::Boolean - $(...) ==> Invocation - $it ==> ColumnPath - Anything with at least one '.' ==> ColumnPath - Anything else ==> Variable * Ignore failing tests
This commit is contained in:
@ -1154,6 +1154,10 @@ impl Expression {
|
||||
Expression::Variable(Variable::Other(v, span))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn boolean(b: bool) -> Expression {
|
||||
Expression::Boolean(b)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)]
|
||||
|
Reference in New Issue
Block a user