stk/value/value.rs
1use crate::any::Any;
2use crate::collections::HashMap;
3use crate::hash::Hash;
4
5#[derive(Debug)]
6/// A value peeked out of the stack.
7pub enum Value {
8 /// An empty unit.
9 Unit,
10 /// A string.
11 String(String),
12 /// An array.
13 Array(Vec<Value>),
14 /// An object.
15 Object(HashMap<String, Value>),
16 /// An integer.
17 Integer(i64),
18 /// A float.
19 Float(f64),
20 /// A boolean.
21 Bool(bool),
22 /// A character.
23 Char(char),
24 /// Reference to an external type.
25 External(Any),
26 /// A type to a different value.
27 Type(Hash),
28 /// A function.
29 Fn(Hash),
30}