コード例 #1
0
 /// <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;
 }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        /// <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;
        }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
ファイル: Parser.cs プロジェクト: erlis/IronSmalltalk
 protected virtual UnaryMessageNode ParseUnaryMessage(MessageSequenceBase parent, IdentifierToken token)
 {
     // PARSE: <unary message> ::= unarySelector
     return new UnaryMessageNode(parent, token);
 }
コード例 #6
0
ファイル: Parser.cs プロジェクト: erlis/IronSmalltalk
        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;
        }