diff options
author | Mike Krüger <mkrueger@novell.com> | 2009-03-17 12:31:03 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2009-03-17 12:31:03 +0300 |
commit | 3ffc0097f8577f700e3d2e2fa228d3d7ca4bad44 (patch) | |
tree | 8f208ea3b5b3dc036161110add0ffb5a33fbb273 /main/contrib | |
parent | acda56fa8cb5405c26ccfe6a22c2f4bea971c4f4 (diff) |
* Src/Lexer/ILexer.cs:
* Src/Lexer/CSharp/Lexer.cs:
* Src/Lexer/AbstractLexer.cs: Renamed method.
svn path=/trunk/monodevelop/; revision=129549
Diffstat (limited to 'main/contrib')
4 files changed, 21 insertions, 8 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog index c9db5501e7..db1b7e5357 100644 --- a/main/contrib/NRefactory/Project/ChangeLog +++ b/main/contrib/NRefactory/Project/ChangeLog @@ -2,6 +2,12 @@ * Src/Lexer/ILexer.cs: * Src/Lexer/CSharp/Lexer.cs: + * Src/Lexer/AbstractLexer.cs: Renamed method. + +2009-03-17 Mike Krüger <mkrueger@novell.com> + + * Src/Lexer/ILexer.cs: + * Src/Lexer/CSharp/Lexer.cs: * Src/Lexer/AbstractLexer.cs: Added SetDefinedSymbols method. 2009-03-16 Mike Krüger <mkrueger@novell.com> diff --git a/main/contrib/NRefactory/Project/Src/Lexer/AbstractLexer.cs b/main/contrib/NRefactory/Project/Src/Lexer/AbstractLexer.cs index f173df750f..8b58633496 100644 --- a/main/contrib/NRefactory/Project/Src/Lexer/AbstractLexer.cs +++ b/main/contrib/NRefactory/Project/Src/Lexer/AbstractLexer.cs @@ -46,7 +46,17 @@ namespace ICSharpCode.NRefactory.Parser get { throw new NotSupportedException(); } } - public virtual void SetDefinedSymbols (string symbols) + protected static IEnumerable<string> GetSymbols (string symbols) + { + foreach (string symbol in symbols.Split (';')) { + string s = symbol.Trim (); + if (s.Length == 0) + continue; + yield return s; + } + } + + public virtual void SetConditionalCompilationSymbols (string symbols) { throw new NotSupportedException (); } diff --git a/main/contrib/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs b/main/contrib/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs index 078f0004ef..19e078379d 100644 --- a/main/contrib/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs +++ b/main/contrib/NRefactory/Project/Src/Lexer/CSharp/Lexer.cs @@ -990,13 +990,10 @@ namespace ICSharpCode.NRefactory.Parser.CSharp get { return conditionalCompilation.Symbols; } } - public override void SetDefinedSymbols (string symbols) + public override void SetConditionalCompilationSymbols (string symbols) { - foreach (string symbol in symbols.Split (';')) { - string s = symbol.Trim (); - if (s.Length == 0) - continue; - conditionalCompilation.Define (s); + foreach (string symbol in GetSymbols (symbols)) { + conditionalCompilation.Define (symbol); } } diff --git a/main/contrib/NRefactory/Project/Src/Lexer/ILexer.cs b/main/contrib/NRefactory/Project/Src/Lexer/ILexer.cs index 42460399a9..fa70589ba5 100644 --- a/main/contrib/NRefactory/Project/Src/Lexer/ILexer.cs +++ b/main/contrib/NRefactory/Project/Src/Lexer/ILexer.cs @@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.Parser /// <param name="symbols"> /// A <see cref="System.String"/> containing the symbols. The symbols are separated by ';'. /// </param> - void SetDefinedSymbols (string symbols); + void SetConditionalCompilationSymbols (string symbols); /// <summary> /// Returns the comments that had been read and containing tag key words. |