[Monodevelop-patches-list] r2557 - in trunk/MonoDevelop/Extras/BooBinding: . Parser

Peter Johanson <latexer@gentoo.org> pjohanson at mono-cvs.ximian.com
Sun May 22 15:18:47 EDT 2005


Author: pjohanson
Date: 2005-05-22 15:18:47 -0400 (Sun, 22 May 2005)
New Revision: 2557

Modified:
   trunk/MonoDevelop/Extras/BooBinding/ChangeLog
   trunk/MonoDevelop/Extras/BooBinding/Parser/Resolver.boo
Log:
More cleanups, and make static/non-static member listing work properly.


Modified: trunk/MonoDevelop/Extras/BooBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Extras/BooBinding/ChangeLog	2005-05-22 18:02:53 UTC (rev 2556)
+++ trunk/MonoDevelop/Extras/BooBinding/ChangeLog	2005-05-22 19:18:47 UTC (rev 2557)
@@ -1,5 +1,11 @@
 2005-05-22  Peter Johanson <latexer at gentoo.org>
 
+	* Parser/Resolver.boo: More cleanups,
+	and make static/non-static member showing work
+	properly.
+
+2005-05-22  Peter Johanson <latexer at gentoo.org>
+
 	* Parser/BooParser.boo:
 	* Parser/Resolver.boo: Various small cleanups
 	* Parser/Visitor.boo: Some small cleanups, and parse

Modified: trunk/MonoDevelop/Extras/BooBinding/Parser/Resolver.boo
===================================================================
--- trunk/MonoDevelop/Extras/BooBinding/Parser/Resolver.boo	2005-05-22 18:02:53 UTC (rev 2556)
+++ trunk/MonoDevelop/Extras/BooBinding/Parser/Resolver.boo	2005-05-22 19:18:47 UTC (rev 2557)
@@ -114,7 +114,7 @@
 	
 	def InnerGetTypeFromLocal(name as string) as IReturnType:
 		member = self.CurrentMember
-		Print("member", member)
+		//Print("member", member)
 		if member isa BooAbstractMethod:
 			method as BooAbstractMethod = member
 			for para as IParameter in method.Parameters:
@@ -195,7 +195,7 @@
 					for alias as string in u.Aliases.Keys:
 						result.Add(alias)
 			member = self.CurrentMember
-			Print("member", member)
+			//Print("member", member)
 			if member != null:
 				varList as Hashtable = null
 				if member isa BooAbstractMethod:
@@ -204,19 +204,15 @@
 						result.Add(Field(para.ReturnType, para.Name, ModifierEnum.Private, null))
 					if method.Node != null:
 						varLookup = VariableListLookupVisitor(Resolver: self)
-						print "Visiting method body..."
 						varLookup.Visit(cast(BooAbstractMethod, member).Node.Body)
-						print "Finished visiting method body!"
 						varList = varLookup.Results
 				elif member isa Property:
 					property as Property = member
 					if property.Node != null:
 						varLookup = VariableListLookupVisitor(Resolver: self)
 						// TODO: visit only the correct body
-						print "Visiting property body..."
 						varLookup.Visit(property.Node.Getter) unless property.Node.Getter == null
 						varLookup.Visit(property.Node.Setter) unless property.Node.Setter == null
-						print "Finished visiting property body!"
 						varList = varLookup.Results
 				if varList != null:
 					for e as DictionaryEntry in varList:
@@ -294,8 +290,7 @@
 			// try looking if the expression is the name of a class
 			expressionClass = self.SearchType(expression)
 			if expressionClass != null:
-				//return ResolveResult(expressionClass, ListMembers(ArrayList(), expressionClass, callingClass, true))
-				return ResolveResult(expressionClass, ListMembers(ArrayList(), expressionClass))
+				return ResolveResult(expressionClass, ListMembers(ArrayList(), expressionClass, true))
 			
 			// try if it is the name of a namespace
 			if parserService.NamespaceExists(_project, expression):
@@ -306,7 +301,7 @@
 			visitor = ExpressionTypeVisitor(Resolver : self)
 			visitor.Visit(expr)
 			retType = visitor.ReturnType
-			Print ("result", retType)
+			//Print ("result", retType)
 			if visitor.ReturnClass != null:
 				returnClass = visitor.ReturnClass
 			elif retType != null:
@@ -330,12 +325,8 @@
 
 	#region Code converted from CSharpBinding/Parser/Resolver.cs
 	def MustBeShowen(c as IClass, member as IDecoration) as bool:
-		// FIXME: _showStatic should be coming from elsewhere... but where? (See CSharpBinding)
-		_showStatic = false
-//		print("member:" + member.Modifiers);
 		if (((not _showStatic) and  ((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static)) or
-		    ( _showStatic and not ((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static))):
-			//// enum type fields are not shown here - there is no info in member about enum field
+		   (_showStatic and not ((member.Modifiers & ModifierEnum.Static) == ModifierEnum.Static))):
 			return false
 		
 //		print("Testing Accessibility");
@@ -381,8 +372,10 @@
 		return null
 	
 	def ListMembers(members as ArrayList, curType as IClass) as ArrayList:
-		// FIXME: _showStatic should be coming from elsewhere... but where? (See CSharpBinding)
-		_showStatic = false
+		return ListMembers (members, curType, false)
+	
+	def ListMembers(members as ArrayList, curType as IClass, showStatic as bool) as ArrayList:
+		_showStatic = showStatic
 //		print("LIST MEMBERS!!!");
 //		print("_showStatic = " + _showStatic);
 //		print(curType.InnerClasses.Count + " classes");
@@ -433,7 +426,7 @@
 			baseClass = BaseClass(curType)
 			if (baseClass != null):
 //				print("Base Class = " + baseClass.FullyQualifiedName)
-				ListMembers(members, baseClass)
+				ListMembers(members, baseClass, _showStatic)
 
 //		print("listing finished");
 		return members;




More information about the Monodevelop-patches-list mailing list