Add execute once annotation.

This commit is contained in:
2023-02-18 14:48:09 +08:00
parent 23789c15eb
commit 13893b2853

View File

@@ -88,9 +88,14 @@ namespace Cryville.Crtr {
if (nstack == null) throw;
nstack.Elements.Add(e);
}
if (nctx != null) MatchDynamic(e.Element, group, dl, nstack, new RuntimeSkinContext(
nctx, e.Context, e.Selectors.annotations.Contains("if"), e.Selectors.annotations.Contains("then")
));
if (nctx != null) {
MatchDynamic(e.Element, group, dl, nstack, new RuntimeSkinContext(
nctx, e.Context, e.Selectors.annotations.Contains("if"), e.Selectors.annotations.Contains("then")
));
if (e.Selectors.annotations.Contains("once")) {
stack.Elements.RemoveAt(i--);
}
}
if (psrcs != null) ChartPlayer.etor.ContextCascadeDiscard();
}
Profiler.EndSample();