diff options
| author | Mike Buland <mike@xagasoft.com> | 2026-06-22 09:22:25 -0700 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2026-06-22 09:22:25 -0700 |
| commit | 5eedc8e9080afe1d7fa00d9577343fe5aa25a93d (patch) | |
| tree | 4f1b1fb7a7dad482af54b1d07e5252d7f85ed313 /src/lib.rs | |
| parent | dd2f66f2fe7ee687d8c0b7ca6e60ef7221223fb2 (diff) | |
| download | crimtag-5eedc8e9080afe1d7fa00d9577343fe5aa25a93d.tar.gz crimtag-5eedc8e9080afe1d7fa00d9577343fe5aa25a93d.tar.bz2 crimtag-5eedc8e9080afe1d7fa00d9577343fe5aa25a93d.tar.xz crimtag-5eedc8e9080afe1d7fa00d9577343fe5aa25a93d.zip | |
Attempted fixes. Maybe made it too C++ish
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
| @@ -7,7 +7,7 @@ mod lexer; | |||
| 7 | mod parser; | 7 | mod parser; |
| 8 | mod position; | 8 | mod position; |
| 9 | mod error; | 9 | mod error; |
| 10 | mod context; | 10 | pub mod context; |
| 11 | 11 | ||
| 12 | pub use error::{CrimError,CrimResult}; | 12 | pub use error::{CrimError,CrimResult}; |
| 13 | pub use position::*; | 13 | pub 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 | } |
