diff options
Diffstat (limited to 'src/transpile_scheme.rs')
-rw-r--r-- | src/transpile_scheme.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/transpile_scheme.rs b/src/transpile_scheme.rs index 5c8bd66..79492d8 100644 --- a/src/transpile_scheme.rs +++ b/src/transpile_scheme.rs @@ -46,14 +46,19 @@ impl TranspileScheme for Expr { match *self { Integer(e) => Ok(format!("{}", e)), Float(e) => Ok(format!("{}", e)), + Boolean(true) => Ok(format!("#t")), + Boolean(false) => Ok(format!("#f")), + StringLiteral(ref s) => Ok(format!("\"{}\"", s)), Ident(ref e) => Ok(format!("{}", e)), Der(ref e) => Ok(format!("(der {})", try!(e.repr_scheme()))), - Abs(ref e) => Ok(format!("(abs {})", try!(e.repr_scheme()))), + Sign(ref e) => Ok(format!("(sign {})", try!(e.repr_scheme()))), + MathUnaryExpr(func, ref e) => Ok(format!("({:?} {})", func, try!(e.repr_scheme()))), BinExpr(op, ref l, ref r) => Ok(format!("({:?} {} {})", op, try!(l.repr_scheme()), try!(r.repr_scheme()))), + Array(_) => Err("Array unimplemented".to_string()), } } } |