From 32c252d4d249033fc4390047ec6e988d13d84da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hozda?= Date: Sat, 28 Oct 2017 20:56:34 +0200 Subject: [PATCH] allow unary operators as the first token after if or while --- Cargo.toml | 2 +- src/parser.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5334ac6c..4f650763 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rhai" -version = "0.6.0" +version = "0.6.1" authors = ["Jonathan Turner", "Lukáš Hozda"] description = "Embedded scripting for Rust" homepage = "https://github.com/jonathandturner/rhai" diff --git a/src/parser.rs b/src/parser.rs index 667f424c..dd13de5d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -191,6 +191,8 @@ impl Token { Or | Ampersand | And | + If | + While | Return => true, _ => false, }