示例#1
0
        void ParseIdentifier()
        {
            Token token = this.PeekToken();

            if (!Parser.IsCanFollowIdentifier(token))
            {
                throw this.BuildException(Error.BinaryCommaMemberParenIndexerExpected);
            }
            if (this._tree._top.Expression is MemberOp)
            {
                MemberId memberId = new MemberId(this._current.StringValue);
                _tree.AddOperand(memberId);
            }
            else
            {
                Variable variable = new Variable(this._current.StringValue);
                _tree.AddOperand(variable);
            }
        }
示例#2
0
 void ParseIdentifier()
 {
     Token token = this.PeekToken();
     if (!Parser.IsCanFollowIdentifier(token))
     {
         throw this.BuildException(Error.BinaryCommaMemberParenIndexerExpected);
     }
     if (this._tree._top.Expression is MemberOp)
     {
         MemberId memberId = new MemberId(this._current.StringValue);
         _tree.AddOperand(memberId);
     }
     else
     {
         Variable variable = new Variable(this._current.StringValue);
         _tree.AddOperand(variable);
     }
 }