Make Evaluable trait

This commit is contained in:
greg 2016-01-19 01:30:48 -08:00
parent 16e8d969be
commit 5a9ebb188d
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,12 @@ impl Evaluator {
}
}
trait Evaluable {
type Output;
fn is_reducible(&self) -> bool;
fn reduce(self) -> Self::Output;
}
impl Evaluator {
fn reduce_node(&mut self, mut node: ASTNode) -> String {
loop {