add a process value
This commit is contained in:
parent
801e5bcc01
commit
c144702b98
|
@ -382,6 +382,7 @@ pub fn r#type(x: &Value) -> Value {
|
|||
Value::Box(_) => Value::Keyword("box"),
|
||||
Value::BaseFn(_) => Value::Keyword("fn"),
|
||||
Value::Partial(_) => Value::Keyword("fn"),
|
||||
Value::Process => Value::Keyword("process"),
|
||||
Value::Nothing => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,6 +131,7 @@ pub enum Value {
|
|||
Fn(Rc<LFn>),
|
||||
BaseFn(BaseFn),
|
||||
Partial(Rc<Partial>),
|
||||
Process,
|
||||
}
|
||||
|
||||
impl PartialEq for Value {
|
||||
|
@ -167,6 +168,7 @@ impl std::fmt::Display for Value {
|
|||
Interned(str) => write!(f, "\"{str}\""),
|
||||
String(str) => write!(f, "\"{str}\""),
|
||||
Number(n) => write!(f, "{n}"),
|
||||
Process => write!(f, "Process"),
|
||||
Tuple(members) => write!(
|
||||
f,
|
||||
"({})",
|
||||
|
@ -214,6 +216,7 @@ impl Value {
|
|||
pub fn show(&self) -> String {
|
||||
use Value::*;
|
||||
let mut out = match &self {
|
||||
Process => "Process".to_string(),
|
||||
Nil => "nil".to_string(),
|
||||
True => "true".to_string(),
|
||||
False => "false".to_string(),
|
||||
|
@ -308,6 +311,7 @@ impl Value {
|
|||
pub fn stringify(&self) -> String {
|
||||
use Value::*;
|
||||
match &self {
|
||||
Process => "process".to_string(),
|
||||
Nil => "nil".to_string(),
|
||||
True => "true".to_string(),
|
||||
False => "false".to_string(),
|
||||
|
@ -369,6 +373,7 @@ impl Value {
|
|||
Fn(..) => "fn",
|
||||
BaseFn(..) => "fn",
|
||||
Partial(..) => "fn",
|
||||
Process => "process",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user