/// <summary> /// Create a new binary message node. /// </summary> /// <param name="parent">The parent message sequence node that defines this message node.</param> /// <param name="token">Token containing the message selector.</param> protected internal BinaryMessageNode(MessageSequenceBase parent, BinarySelectorToken token) : base(parent) { #if DEBUG if (token == null) throw new ArgumentNullException("token"); #endif this.SelectorToken = token; }
/// <summary> /// Create a new message node. /// </summary> /// <param name="parent">The parent message sequence node that defines this message node.</param> protected MessageNode(MessageSequenceBase parent) { #if DEBUG if (parent == null) { throw new ArgumentNullException("parent"); } #endif this.Parent = parent; }
/// <summary> /// Create and initialize a new unary message node. /// </summary> /// <param name="parent">The parent message sequence node that defines this message node.</param> /// <param name="token">Token containing the message selector.</param> protected internal UnaryMessageNode(MessageSequenceBase parent, IdentifierToken token) : base(parent) { #if DEBUG if (token == null) { throw new ArgumentNullException("token"); } #endif this.SelectorToken = token; }
/// <summary> /// Create a new message node. /// </summary> /// <param name="parent">The parent message sequence node that defines this message node.</param> protected MessageNode(MessageSequenceBase parent) { #if DEBUG if (parent == null) throw new ArgumentNullException("parent"); #endif this.Parent = parent; }
protected virtual UnaryMessageNode ParseUnaryMessage(MessageSequenceBase parent, IdentifierToken token) { // PARSE: <unary message> ::= unarySelector return new UnaryMessageNode(parent, token); }
protected virtual BinaryMessageNode ParseBinaryMessage(MessageSequenceBase parent, BinarySelectorToken selector) { // PARSE: <binary message> ::= binarySelector <binary argument> BinaryMessageNode result = new BinaryMessageNode(parent, selector); Token token = this.GetNextTokenxx(Preference.NegativeSign); // Parse the binary argument ... ParseBinaryArgument() does not fail and reports errors self. BinaryArgumentNode argument = this.ParseBinaryArgument(result, token); if (argument != null) result.SetContents(argument); return result; }