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

@@ -4,7 +4,7 @@ use rhai::Engine;
fn main() {
let mut engine = Engine::new();
if let Ok(result) = engine.eval::<i32>("40 + 2") {
if let Ok(result) = engine.eval::<i64>("40 + 2") {
println!("Answer: {}", result); // prints 42
}
}