summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 9867615..162c30c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -7,7 +7,7 @@ mod lexer;
7mod parser; 7mod parser;
8mod position; 8mod position;
9mod error; 9mod error;
10mod context; 10pub mod context;
11 11
12pub use error::{CrimError,CrimResult}; 12pub use error::{CrimError,CrimResult};
13pub use position::*; 13pub use position::*;
@@ -213,10 +213,8 @@ fn exec<'a>(input: &StatefulContext<'a>, tokens: &Vec<Token>, buf: &mut String)
213 } 213 }
214 Token::If(ident,code,other) => { 214 Token::If(ident,code,other) => {
215 if let Some(value) = input.get_value( &ident ) && 215 if let Some(value) = input.get_value( &ident ) &&
216 let MappedValue::Bool(b) = value && 216 let MappedValue::Bool(b) = value && b {
217 b { 217 exec(input, code, buf)?
218
219 exec(input, code, buf)?
220 } else { 218 } else {
221 exec(input, other, buf)? 219 exec(input, other, buf)?
222 } 220 }