Beispiel #1
0
		/// <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 };
		}
Beispiel #2
0
		public STNode AddLast(Token value) {
			return AddLastPrivate(Create(value));
		}
Beispiel #3
0
		/// <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();
		}
Beispiel #4
0
		public STNode AddNext(Token value) {
			Contract.Requires(Parent != null);
			return This.Next.AddPrevIgnoringFirstChild(Create(value));
		}
Beispiel #5
0
		public STNode AddPrev(Token value) {
			Contract.Requires(Parent != null);
			var node = Create(value);
			if (Parent.FirstChild == This) {
				Parent.FirstChild = node;
			}
			return AddPrevIgnoringFirstChild(node);
		}