public TaskDef CreateTaskDef(Token token, AstNodeKind kind) { if (token.ToString() == Name) { kind = AstNodeKind.CreatorDef; } switch (kind) { case AstNodeKind.CreatorDef: token = TokenInstance.CSharp.CREATE; break; } //Create StubDef TaskStubDef stubDef; switch (kind) { case AstNodeKind.CreatorDef: stubDef = new ExpertStubDef(token); break; default: stubDef = new TaskStubDef(token); break; } //CreateProcDef TaskProcedureDef procDef = new TaskProcedureDef(new Token(token.ToString() + "Proc")); TaskDef taskDef = TaskDef.Create(this, kind, token, stubDef, procDef); return(taskDef); }
public static TaskDef Create(ExpertDef parent, AstNodeKind kind, Token token, TaskStubDef stubDef, TaskProcedureDef procDef) { TaskDef def = new TaskDef(parent, kind, token, stubDef, procDef); if (kind != AstNodeKind.InnerTaskDef) { def.AddChild(stubDef); } def.AddChild(procDef); parent.AddChild(def); return(def); }
public TaskDef CreateSubtaskDef() { TaskDef taskDef = ExpertDef.CreateTaskDef(new Token(Token.ToString() + "_" + ++SubtaskCount), AstNodeKind.InnerTaskDef); return(taskDef); }
// public TriggerStmt(TaskDef taskDef) : base(AstNodeKind.TriggerDef) { TaskDef = taskDef; }