public static void LowerPackage(AstNode astNode, LoweringContext context) { var astPackage = astNode as AstTask.AstPackageNode; if (astPackage != null) { if (astPackage.Emit) { var p = new Package(astPackage); context.ParentObject.Children.Add(p); context = new TaskLoweringContext(p); LowerConnection(astPackage.LogConnection, context); LowerChildren(astPackage, context); LowerEventHandlers(astPackage, p, context); } else { MessageEngine.Trace( astPackage, Severity.Debug, "D_S008", "Skipped Lowering of Package {0} because Emit was {1}", astPackage.Name, astPackage.Emit); } } }
public static void LowerForLoop(AstNode astNode, LoweringContext context) { var astContainer = astNode as AstTask.AstForLoopContainerTaskNode; if (astContainer != null) { var forLoop = new PhysicalTask.ForLoop(astContainer); context.ParentObject.Children.Add(forLoop); LowerConnection(astContainer.LogConnection, context); context = new TaskLoweringContext(forLoop); LowerChildren(astContainer, context); LowerEventHandlers(astContainer, forLoop, context); } }
public static void LowerContainer(AstNode astNode, LoweringContext context) { var astContainer = astNode as AstTask.AstContainerTaskNode; if (astContainer != null) { var seq = new PhysicalTask.Sequence(astContainer); context.ParentObject.Children.Add(seq); LowerConnection(astContainer.LogConnection, context); context = new TaskLoweringContext(seq); LowerChildren(astContainer, context); LowerEventHandlers(astContainer, seq, context); } }
public static void LowerEventHandlers(AstTask.AstTaskNode astTaskNode, Executable parentExecutable, LoweringContext context) { foreach (AstTask.AstTaskEventHandlerNode astTaskEventHandler in astTaskNode.Events) { PhysicalTask.EventHandler e = new IR.Tasks.EventHandler(astTaskEventHandler, parentExecutable); context.ParentObject.Children.Add(e); foreach (AstTask.AstTaskNode task in astTaskEventHandler.Tasks) { context = new TaskLoweringContext(e); PhysicalLoweringProcessor.Lower(task, context); } } }