Add support for character constants

This commit is contained in:
jonathandturner
2016-04-13 18:40:06 -07:00
parent 3364191781
commit b9ea072d6a
7 changed files with 180 additions and 17 deletions

View File

@@ -5,9 +5,9 @@ fn main() {
let mut engine = Engine::new();
let mut scope: Scope = Vec::new();
if let Ok(_) = engine.eval_with_scope::<()>(&mut scope, "var x = 4 + 5") { } else { assert!(false); }
if let Ok(_) = engine.eval_with_scope::<()>(&mut scope, "var x = 4 + 5") { } else { assert!(false); }
if let Ok(result) = engine.eval_with_scope::<i32>(&mut scope, "x") {
if let Ok(result) = engine.eval_with_scope::<i64>(&mut scope, "x") {
println!("result: {}", result);
}
}