/// <summary>
 /// Initializes the node after being parsed by the parser.
 /// </summary>
 /// <param name="argument">Parse node that is the argument for the binary message.</param>
 protected internal void SetContents(BinaryArgumentNode argument)
 {
     if (argument == null)
     {
         throw new ArgumentNullException();
     }
     this.Argument = argument;
 }
 /// <summary>
 /// Initializes the node after being parsed by the parser.
 /// </summary>
 /// <param name="argument">Parse node that is the argument for the binary message.</param>
 protected internal void SetContents(BinaryArgumentNode argument)
 {
     if (argument == null)
         throw new ArgumentNullException();
     this.Argument = argument;
 }
Beispiel #3
0
        protected virtual BinaryArgumentNode ParseBinaryArgument(BinaryMessageNode parent, Token token)
        {
            // PARSE: <binary argument> ::= <primary> <unary message>*
            BinaryArgumentNode result = new BinaryArgumentNode(parent);

            IPrimaryNode primary = this.ParsePrimary(result, token);
            if (primary == null)
            {
                this.ReportParserError(result, SemanticErrors.MissingPrimary, token);
                return result;
            }

            token = this.GetNextTokenxx(Preference.Default);

            UnaryMessageSequenceNode messages = null;
            if (token is IdentifierToken)
                // <unary message>*
                messages = this.ParseUnaryMessageSequence(result, (IdentifierToken)token);
            else
                this.ResidueToken = token;

            result.SetContents(primary, messages);
            return result;
        }