/// <summary>Checks whether this token is the specified predefined keyword token.</summary> /// <param name="keyword">The predefined keyword to check.</param> /// <returns>If this token equals the specified keyword, true; otherwise, false.</returns> public override bool Equals(PredefinedKeyword keyword) { return(this.keyword == keyword); }
static void Add(string word, PredefinedKeyword keyword) { Add(word, TokenType.Keyword); keywords[word] = keyword; }
/// <summary>Initializes a new instance of the <see cref="PredefinedKeywordToken"/> class.</summary> /// <param name="keyword">The keyword.</param> /// <param name="startPosition">The start position.</param> /// <param name="endPosition">The end position.</param> internal PredefinedKeywordToken(PredefinedKeyword keyword, TextPosition startPosition, TextPosition endPosition) : base(TokenType.Keyword, startPosition, endPosition) { this.keyword = keyword; }
/// <summary>Checks whether this token is the specified predefined keyword token.</summary> /// <param name="keyword">The predefined keyword to check.</param> /// <returns>If this token equals the specified keyword, true; otherwise, false.</returns> public virtual bool Equals(PredefinedKeyword keyword) { return(false); }