This commit is contained in:
Edwin Cheng
2019-05-03 00:01:48 +08:00
parent 91745c62f8
commit ab91050d49

View File

@@ -363,7 +363,7 @@ fn expand_tt(
let mut has_seps = 0; let mut has_seps = 0;
let mut counter = 0; let mut counter = 0;
// We store the old var expaned value, and restore it later // We store the old var expanded value, and restore it later
// It is because before this `$repeat`, // It is because before this `$repeat`,
// it is possible some variables already expanad in the same subtree // it is possible some variables already expanad in the same subtree
// //
@@ -373,12 +373,12 @@ fn expand_tt(
ctx.var_expanded = false; ctx.var_expanded = false;
while let Ok(t) = expand_subtree(&repeat.subtree, ctx) { while let Ok(t) = expand_subtree(&repeat.subtree, ctx) {
// if no var expaned in the child, we count it as a fail // if no var expanded in the child, we count it as a fail
if !ctx.var_expanded { if !ctx.var_expanded {
break; break;
} }
// Reset `ctx.var_expaneded` to see if there is other expaned variable // Reset `ctx.var_expandeded` to see if there is other expanded variable
// in the next matching // in the next matching
some_var_expanded = true; some_var_expanded = true;
ctx.var_expanded = false; ctx.var_expanded = false;