summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b682ddc..95462b4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -196,24 +196,15 @@ impl Crimtag {
196fn exec<T: for<'a> MappedStructure<'a>>(input: &StatefulContext<T>, tokens: &Vec<Token>, buf: &mut String) -> CrimResult<()> { 196fn exec<T: for<'a> MappedStructure<'a>>(input: &StatefulContext<T>, tokens: &Vec<Token>, buf: &mut String) -> CrimResult<()> {
197 for token in tokens { 197 for token in tokens {
198 match token { 198 match token {
199 Token::Loop(_ident,_code) => { 199 Token::Loop(ident,code) => {
200 /*
201 if let Some(value) = input.get_value( &ident ) && 200 if let Some(value) = input.get_value( &ident ) &&
202 let Value::List(list) = value { 201 let MappedValue::List(list) = value {
203 for rec in &list { 202 list.for_each(&|rec: &MappedValue| {
204 if let Value::Dictionary(d) = rec { 203 if let MappedValue::Struct(d) = rec {
205 if matches!(d, Context) &&
206 matches!(input.root, Context) {
207 println!("Matches.");
208 } else {
209 println!("Doesn't match.");
210
211 }
212 exec( &StatefulContext::root(d), code, buf )? 204 exec( &StatefulContext::root(d), code, buf )?
213 } 205 }
214 } 206 });
215 } 207 }
216 */
217 return Ok(()); 208 return Ok(());
218 } 209 }
219 Token::If(ident,code,other) => { 210 Token::If(ident,code,other) => {