Author: mkrueger
Date: 2007-10-09 04:41:47 -0400 (Tue, 09 Oct 2007)
New Revision: 87151
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Parser/Parser.cs
Log:
* Parser/Parser.cs: Fixed "Bug 331772 - Unable to handle conditional
class definition".
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-10-09 08:40:34 UTC
(rev 87150)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-10-09 08:41:47 UTC
(rev 87151)
@@ -1,5 +1,10 @@
2007-10-09 Mike Krüger <[EMAIL PROTECTED]>
+ * Parser/Parser.cs: Fixed "Bug 331772 - Unable to handle conditional
class
+ definition".
+
+2007-10-09 Mike Krüger <[EMAIL PROTECTED]>
+
* Gui/CSharpTextEditorExtension.cs: Fixed "Bug 331000 - Auto-generation
of
XML comment tags sometimes incorrect".
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/Parser.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/Parser.cs 2007-10-09
08:40:34 UTC (rev 87150)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/Parser.cs 2007-10-09
08:41:47 UTC (rev 87151)
@@ -87,6 +87,23 @@
ICompilationUnit Parse (ICSharpCode.NRefactory.IParser p,
string fileName)
{
+ // HACK: Better way would to pass the project to the
Parse method, but works for now. (Refactoring should be done)
+ DotNetProject project =
MonoDevelop.Ide.Gui.IdeApp.ProjectOperations.GetProjectContaining (fileName) as
DotNetProject;
+ if (project != null) {
+ DotNetProjectConfiguration config =
project.ActiveConfiguration as DotNetProjectConfiguration;
+ if (config != null) {
+ CSharpCompilerParameters para =
config.CompilationParameters as CSharpCompilerParameters;
+ if (para != null &&
!String.IsNullOrEmpty (para.DefineSymbols)) {
+ string[] symbols =
para.DefineSymbols.Split (';');
+ if (symbols != null) {
+
((ICSharpCode.NRefactory.Parser.CSharp.Lexer)p.Lexer).ClearDefinedSymbols ();
+ foreach (string symbol
in symbols) {
+
((ICSharpCode.NRefactory.Parser.CSharp.Lexer)p.Lexer).AddDefinedSymbol (symbol);
+ }
+ }
+ }
+ }
+ }
p.Lexer.SpecialCommentTags = lexerTags;
List<ErrorInfo> errors = new List<ErrorInfo>();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches