public virtual ktFunction AddMethod(ktFunction Method) { if (Method == null) { return null; } if (m_Methods == null) { m_Methods = new ktList(); } m_Methods.Add(Method); return Method; }
public ktFunctionClass( ktFunction Func ) : base("ktFunction") { m_function = Func; }
public bool AddFunction(ktString Name, ktBlock Block, ktList Arguments, ktValue Ret) { ktFunction Func = new ktFunction(Name, Arguments, Block, Ret); return AddFunction(Func); }
public bool AddFunction(ktFunction Function) { // No Function?? if (Function == null) { return false; } // Create Function list if not set if (m_Functions == null) { m_Functions = new ktList(); } // Create a new node (with name and func), and add it return m_Functions.Add(Function.Name, Function); }
/// <summary> /// Add a function to the main block... /// </summary> public void AddFunction(ktFunction Func) { if (m_MainBlock == null) { m_MainBlock = new ktBlock(m_Lines.First); } m_MainBlock.AddFunction(Func); }