Add a very silly ls

This commit is contained in:
JT
2021-09-10 13:06:44 +12:00
parent 5edcf3910d
commit 16baf5e16a
5 changed files with 23 additions and 2 deletions

View File

@ -278,6 +278,13 @@ impl Value {
Ok(current)
}
pub fn string(s: &str, span: Span) -> Value {
Value::String {
val: s.into(),
span,
}
}
pub fn is_true(&self) -> bool {
matches!(self, Value::Bool { val: true, .. })
}