procc_ll/
values.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use std::fmt::{Debug, Formatter};
/// Values that retune the functions, tokens, keys i that also returns the exec of ProgramBlock
#[derive(PartialEq, Clone)]
pub enum Values {
    String(String),
    Number(f64),
    Boolean(bool),
    Array(Vec<Values>),
    CodeBlock(Vec<String>),
    Null
}
impl Debug for Values {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        match self {
            Values::String(v) => write!(f, "{}", v),
            Values::Number(v) => write!(f, "{}", v),
            Values::Boolean(v) => write!(f, "{}", v),
            Values::Array(v) => { write!(f, "[")?; v.fmt(f) },
            Values::CodeBlock(_) => write!(f, "Code Block"),
            _ => { write!(f, "null") }
        }
    }
}