예제 #1
0
        public override bool Equals(Token that)
        {
            Contracts.AssertValue(that);

            if (!(that is NumLitToken))
            {
                return(false);
            }
            NumLitToken thatNumLitToken = that.As <NumLitToken>();

            return(Value == thatNumLitToken.Value && base.Equals(that));
        }
예제 #2
0
 /// <summary>
 /// Copy Ctor for NumLitToken used by Clone
 /// </summary>
 /// <param name="tok">The token to be copied</param>
 /// <param name="newSpan">The new span</param>
 private NumLitToken(NumLitToken tok, Span newSpan)
     : this(tok.Value, newSpan)
 {
 }