[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SF.net SVN: supercollider: [7344] trunk/build/SCClassLibrary/Common/Helper/ docParser.sc



Revision: 7344
          http://svn.sourceforge.net/supercollider/?rev=7344&view=rev
Author:   cruxxial
Date:     2008-02-18 05:53:35 -0800 (Mon, 18 Feb 2008)

Log Message:
-----------
andrea's fixes for the DocParser class 

Modified Paths:
--------------
    trunk/build/SCClassLibrary/Common/Helper/docParser.sc

Modified: trunk/build/SCClassLibrary/Common/Helper/docParser.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Helper/docParser.sc	2008-02-18 07:15:51 UTC (rev 7343)
+++ trunk/build/SCClassLibrary/Common/Helper/docParser.sc	2008-02-18 13:53:35 UTC (rev 7344)
@@ -4,10 +4,9 @@
 
 DocParser {
 	
-	var <>class ;
-	var <classMethods, <instMethods, <getters, <setters, <methods, <classMethods ;
+	var <>targetClass ;
+	var <classMethodList, <instMethodList, <getters, <setters ;
 	var <file, <source ;
-	//var imDict, cmDict, classDoc ;
 	
 	
 	*new {  arg class ;
@@ -17,32 +16,25 @@
 	initDocParser { arg aClass ;
 		var instVarNames = aClass.instVarNames ;
 		instVarNames = instVarNames ? [] ;
-		class = aClass ;
-		classMethods = class.class.methods ;
-		file = File.new(class.filenameSymbol.asString, "r") ;
+		targetClass = aClass ;
+		classMethodList = targetClass.class.methods ;
+		file = File.new(targetClass.filenameSymbol.asString, "r") ;
 		source = file.readAllString ;
 		file.close ;
-		instMethods = class.methods ;
-		instMethods = instMethods ? [] ;
-		setters = instMethods.reject({ arg item ; item.name.asString.includes($_).not }) ;
-		getters = instMethods.select({ arg item ; 
+		instMethodList = targetClass.methods ;
+		instMethodList = instMethodList ? [] ;
+		setters = instMethodList.reject({ arg item ; item.name.asString.includes($_).not }) ;
+		getters = instMethodList.select({ arg item ; 
 			instVarNames.includes(item.name) }) ;
 		setters = setters ? [] ; getters = getters ? [] ;
-		instMethods = instMethods.reject({ arg item ; 
+		instMethodList = instMethodList.reject({ arg item ; 
 			 getters.includes(item) || setters.includes(item) }) ;
-/*
-		classMethods.collect(_.name).postln ;
-		classMethods.collect(_.name).postln ;
-		setters.collect(_.name).postln ;
-		getters.collect(_.name).postln ;
-		instMethods.collect(_.name).postln ;
-*/
 		^this
 	}
 	
 	createCmIndices {
 		var cmIndices = [] ;
-		classMethods.do({ arg method ; 
+		classMethodList.do({ arg method ; 
 			cmIndices = cmIndices.add(method.charPos)
 		}) ;
 		^cmIndices
@@ -50,7 +42,7 @@
 	
 	createImIndices {
 		var imIndices = [] ;
-		instMethods.do({ arg method ; 
+		instMethodList.do({ arg method ; 
 			imIndices = imIndices.add(method.charPos)
 		}) ;
 		^imIndices
@@ -79,12 +71,12 @@
 		var classDoc ; 
 		cmIndices = cmIndices.add(imIndices[0]) ;
 		imIndices =imIndices.add(source.size) ;
-		classMethods.do({ arg method, i ;
+		classMethodList.do({ arg method, i ;
 			cmDict.add( i ->
 				[method, this.getMethodDoc(method, cmIndices[i], cmIndices[i+1])]
 			)
 		}) ;
-		instMethods.do({ arg method, i ;
+		instMethodList.do({ arg method, i ;
 			imDict.add( i ->
 				[method, this.getMethodDoc(method, imIndices[i], imIndices[i+1])]
 			)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.