diff --git a/Cargo.toml b/Cargo.toml index 2c83773..7c11125 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "purrchance" -version = "0.3.0" +version = "0.4.0" authors = ["xenofem "] description = "An unofficial Rust implementation of the Perchance grammar engine" repository = "https://git.xeno.science/xenofem/purrchance" diff --git a/src/lib.rs b/src/lib.rs index 9dd40a6..36bb7ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ pub trait Purrchance { fn eval(&self, g: &Grammar) -> Option; } -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum Symbol { Terminal(String), NonTerminal(String), @@ -25,7 +25,7 @@ impl Purrchance for Symbol { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Expr(Vec); impl Purrchance for Expr { @@ -34,7 +34,7 @@ impl Purrchance for Expr { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct List(Vec<(Expr, f64)>); impl Purrchance for List { @@ -43,7 +43,7 @@ impl Purrchance for List { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Grammar(HashMap); #[cfg(test)]