2
// <copyright see="prj:///doc/copyright.txt"/>
3
// <license see="prj:///doc/license.txt"/>
4
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
5
// <version>$Revision: 4482 $</version>
9
using System.Collections.Generic;
11
namespace ICSharpCode.OldNRefactory.Parser
16
public interface ILexer : IDisposable
23
/// The current Token. <seealso cref="ICSharpCode.OldNRefactory.Parser.Token"/>
30
/// The next Token (The <see cref="Token"/> after <see cref="NextToken"/> call) . <seealso cref="ICSharpCode.OldNRefactory.Parser.Token"/>
37
/// Special comment tags are tags like TODO, HACK or UNDONE which are read by the lexer and stored in <see cref="TagComments"/>.
39
string[] SpecialCommentTags {
45
/// Gets/Sets if the lexer should skip adding comments to the special tracker. Set this
46
/// property to true to improve lexing performance.
48
bool SkipAllComments {
54
/// Gets/Sets if the lexer should evaluate conditional compilation symbols.
56
bool EvaluateConditionalCompilation { get; set; }
59
/// The dictionary with the conditional compilation symbols.
60
/// C# ignores the value (you can use null), it just cares whether a symbol is defined.
62
IDictionary<string, object> ConditionalCompilationSymbols { get; }
65
/// Sets the conditional compilation symbols.
67
/// <param name="symbols">
68
/// A <see cref="System.String"/> containing the symbols. The symbols are separated by ';'.
70
void SetConditionalCompilationSymbols (string symbols);
73
/// Returns the comments that had been read and containing tag key words.
75
List<TagComment> TagComments {
79
SpecialTracker SpecialTracker {
86
/// Gives back the next token. A second call to Peek() gives the next token after the last call for Peek() and so on.
88
/// <returns>An <see cref="Token"/> object.</returns>
92
/// Reads the next token and gives it back.
94
/// <returns>An <see cref="Token"/> object.</returns>
98
/// Skips to the end of the current code block.
99
/// For this, the lexer must have read the next token AFTER the token opening the
100
/// block (so that Lexer.Token is the block-opening token, not Lexer.LookAhead).
101
/// After the call, Lexer.LookAhead will be the block-closing token.
103
void SkipCurrentBlock(int targetToken);