/// <summary> /// Initialzies a new instance of the Node class with the specified value. /// </summary> /// <param name="value"></param> /// <returns></returns> public static STNode Create(Token value) { return new STNode { Value = value }; }
public STNode AddLast(Token value) { return AddLastPrivate(Create(value)); }
/// <summary> /// Initialzies a new instance of the Node class with a default value. /// The Create static method should be used instead of the constructor. /// </summary> protected STNode() { Prev = This; Next = This; Token = new Token(); }
public STNode AddNext(Token value) { Contract.Requires(Parent != null); return This.Next.AddPrevIgnoringFirstChild(Create(value)); }
public STNode AddPrev(Token value) { Contract.Requires(Parent != null); var node = Create(value); if (Parent.FirstChild == This) { Parent.FirstChild = node; } return AddPrevIgnoringFirstChild(node); }