[Monodevelop-patches-list] r2458 - in trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory: . src src/Parser/AST tests
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Fri Apr 15 12:43:43 EDT 2005
Author: jluke
Date: 2005-04-15 12:43:43 -0400 (Fri, 15 Apr 2005)
New Revision: 2458
Modified:
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/ChangeLog
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/AST/Modifier.cs
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/unsafe-1.cs
Log:
more unsafe fixes
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/ChangeLog 2005-04-15 16:11:17 UTC (rev 2457)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/ChangeLog 2005-04-15 16:43:43 UTC (rev 2458)
@@ -1,6 +1,7 @@
2005-04-15 John Luke <john.luke at gmail.com>
* src/Parser/AST/Modifier.cs: add Unsafe to PropertysEventsMethods
+ and class, struct, interface, delegate, and field
* tests/unsafe-1.cs: new test
2005-04-13 John Luke <john.luke at gmail.com>
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs 2005-04-15 16:11:17 UTC (rev 2457)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Main.cs 2005-04-15 16:43:43 UTC (rev 2458)
@@ -20,6 +20,8 @@
static void PrintFile (FileInfo file)
{
string fileName = file.FullName;
+ //Console.WriteLine ("parsing {0}", fileName);
+ Parser p = new Parser();
p.Parse (new Lexer (new FileReader (fileName)));
if (p.Errors.count == 0) {
@@ -48,7 +50,6 @@
PrintDir (di);
}
- static Parser p;
static bool errorMode = false;
public static void Main (string[] args)
@@ -59,7 +60,6 @@
if (args.Length == 2 && args[1] == "-e")
errorMode = true;
- p = new Parser();
PrintDir (new DirectoryInfo (args[0]));
}
}
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/AST/Modifier.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/AST/Modifier.cs 2005-04-15 16:11:17 UTC (rev 2457)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/AST/Modifier.cs 2005-04-15 16:43:43 UTC (rev 2458)
@@ -29,13 +29,14 @@
// Modifier scopes
None = 0x0000,
- Classes = New | Public | Protected | Internal | Private | Abstract | Sealed | Static,
- Fields = New | Public | Protected | Internal | Private | Static | Readonly | Volatile,
+ Classes = New | Public | Protected | Internal | Private | Abstract | Sealed | Static | Unsafe,
+ Fields = New | Public | Protected | Internal | Private | Static | Readonly | Volatile | Unsafe,
PropertysEventsMethods = New | Public | Protected | Internal | Private | Static | Virtual | Sealed | Override | Abstract | Extern | Unsafe,
Indexers = New | Public | Protected | Internal | Private | Virtual | Sealed | Override | Abstract | Extern,
Operators = Public | Static | Extern,
Constants = New | Public | Protected | Internal | Private,
- StructsInterfacesEnumsDelegates = New | Public | Protected | Internal | Private,
+ // FIXME: unsafe is not valid for enums
+ StructsInterfacesEnumsDelegates = New | Public | Protected | Internal | Private | Unsafe,
StaticConstructors = Extern | Static | Unsafe,
Destructors = Extern | Unsafe,
Constructors = Public | Protected | Internal | Private | Extern,
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/unsafe-1.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/unsafe-1.cs 2005-04-15 16:11:17 UTC (rev 2457)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/tests/unsafe-1.cs 2005-04-15 16:43:43 UTC (rev 2458)
@@ -1,7 +1,13 @@
using System;
-class T
+unsafe interface IFoo
{
+}
+
+unsafe class T
+{
+ unsafe int* counter;
+
unsafe private void Foo ()
{
}
@@ -12,3 +18,10 @@
unsafe public event EventHandler Notify;
}
+
+unsafe struct Foo
+{
+}
+
+unsafe delegate void FooBar ();
+
More information about the Monodevelop-patches-list
mailing list