Implement execute once annotation on properties.

This commit is contained in:
2023-02-26 16:21:33 +08:00
parent 0cccb170c1
commit 3561354231

View File

@@ -79,6 +79,9 @@ namespace Cryville.Crtr {
for (int i = 0; i < stack.Properties.Count; i++) {
DynamicProperty p = stack.Properties[i];
p.Key.ExecuteDynamic(_group, p.Context, p.Value, dl);
if (p.Key.annotations.Contains("once")) {
stack.Properties.RemoveAt(i--);
}
}
for (int i = 0; i < stack.Elements.Count; i++) {
DynamicElement e = stack.Elements[i];