mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-16 18:35:02 +01:00
add garbage collection
This commit is contained in:
parent
68a91a7b44
commit
555aa21cc4
1 changed files with 5 additions and 4 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Hash)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
enum Value {
|
enum Value {
|
||||||
Null,
|
Null,
|
||||||
Bool(bool),
|
Bool(bool),
|
||||||
Number(f64),
|
Number(f64),
|
||||||
String(String),
|
String(Rc<String>),
|
||||||
Object(HashMap<String, Value>),
|
Object(Rc<HashMap<String, Value>>),
|
||||||
Array(Vec<Value>),
|
Array(Rc<Vec<Value>>),
|
||||||
|
Fn(Rc<()>),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue