// // // // // $Revision$ // using System; using System.Collections.Generic; namespace ICSharpCode.NRefactory.Parser { /// /// Lexer interface /// public interface ILexer : IDisposable { Errors Errors { get; } /// /// The current Token. /// Token Token { get; } /// /// The next Token (The after call) . /// Token LookAhead { get; } /// /// Special comment tags are tags like TODO, HACK or UNDONE which are read by the lexer and stored in . /// string[] SpecialCommentTags { get; set; } /// /// Gets/Sets if the lexer should skip adding comments to the special tracker. Set this /// property to true to improve lexing performance. /// bool SkipAllComments { get; set; } /// /// Returns the comments that had been read and containing tag key words. /// List TagComments { get; } SpecialTracker SpecialTracker { get; } void StartPeek(); /// /// Gives back the next token. A second call to Peek() gives the next token after the last call for Peek() and so on. /// /// An object. Token Peek(); /// /// Reads the next token and gives it back. /// /// An object. Token NextToken(); /// /// Skips to the end of the current code block. /// For this, the lexer must have read the next token AFTER the token opening the /// block (so that Lexer.Token is the block-opening token, not Lexer.LookAhead). /// After the call, Lexer.LookAhead will be the block-closing token. /// void SkipCurrentBlock(int targetToken); } }