/// <summary> /// Create fields in the emitter type to save local variables intos /// </summary> private void DeclareClosuredVariables(Emitter.Emitter emitter) { var flowSimType = emitter.FindType(PlannerID); foreach (var curr in Closures) { var fld = emitter.CreateField(flowSimType, "_" + curr.Key, new SignatureNode(curr.Value)); emitter.PrepareField(fld); } }