~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/NRefactory/Project/Src/Lexer/ILexer.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// <file>
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>
6
 
// </file>
7
 
 
8
 
using System;
9
 
using System.Collections.Generic;
10
 
 
11
 
namespace ICSharpCode.OldNRefactory.Parser
12
 
{
13
 
        /// <summary>
14
 
        /// Lexer interface
15
 
        /// </summary>
16
 
        public interface ILexer : IDisposable
17
 
        {
18
 
                Errors Errors {
19
 
                        get;
20
 
                }
21
 
                
22
 
                /// <summary>
23
 
                /// The current Token. <seealso cref="ICSharpCode.OldNRefactory.Parser.Token"/>
24
 
                /// </summary>
25
 
                Token Token {
26
 
                        get;
27
 
                }
28
 
                
29
 
                /// <summary>
30
 
                /// The next Token (The <see cref="Token"/> after <see cref="NextToken"/> call) . <seealso cref="ICSharpCode.OldNRefactory.Parser.Token"/>
31
 
                /// </summary>
32
 
                Token LookAhead {
33
 
                        get;
34
 
                }
35
 
                
36
 
                /// <summary>
37
 
                /// Special comment tags are tags like TODO, HACK or UNDONE which are read by the lexer and stored in <see cref="TagComments"/>.
38
 
                /// </summary>
39
 
                string[] SpecialCommentTags {
40
 
                        get;
41
 
                        set;
42
 
                }
43
 
                
44
 
                /// <summary>
45
 
                /// Gets/Sets if the lexer should skip adding comments to the special tracker. Set this
46
 
                /// property to true to improve lexing performance.
47
 
                /// </summary>
48
 
                bool SkipAllComments {
49
 
                        get;
50
 
                        set;
51
 
                }
52
 
                
53
 
                /// <summary>
54
 
                /// Gets/Sets if the lexer should evaluate conditional compilation symbols.
55
 
                /// </summary>
56
 
                bool EvaluateConditionalCompilation { get; set; }
57
 
                
58
 
                /// <summary>
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.
61
 
                /// </summary>
62
 
                IDictionary<string, object> ConditionalCompilationSymbols { get; }
63
 
                
64
 
                /// <summary>
65
 
                /// Sets the conditional compilation symbols. 
66
 
                /// </summary>
67
 
                /// <param name="symbols">
68
 
                /// A <see cref="System.String"/> containing the symbols. The symbols are separated by ';'.
69
 
                /// </param>
70
 
                void SetConditionalCompilationSymbols (string symbols);
71
 
                
72
 
                /// <summary>
73
 
                /// Returns the comments that had been read and containing tag key words.
74
 
                /// </summary>
75
 
                List<TagComment> TagComments {
76
 
                        get;
77
 
                }
78
 
                
79
 
                SpecialTracker SpecialTracker {
80
 
                        get;
81
 
                }
82
 
                
83
 
                void StartPeek();
84
 
                
85
 
                /// <summary>
86
 
                /// Gives back the next token. A second call to Peek() gives the next token after the last call for Peek() and so on.
87
 
                /// </summary>
88
 
                /// <returns>An <see cref="Token"/> object.</returns>
89
 
                Token Peek();
90
 
                
91
 
                /// <summary>
92
 
                /// Reads the next token and gives it back.
93
 
                /// </summary>
94
 
                /// <returns>An <see cref="Token"/> object.</returns>
95
 
                Token NextToken();
96
 
                
97
 
                /// <summary>
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.
102
 
                /// </summary>
103
 
                void SkipCurrentBlock(int targetToken);
104
 
        }
105
 
}