[tekui-devel] tekui: Gendoc: removed code that tried to gather statistics over...

Timm S. Mueller tmueller at neoscientists.org
Mon Apr 7 15:49:29 CEST 2008


details:   http://hg.teklib.org/tekui/rev/c62c9c5f67d7
changeset: 408:c62c9c5f67d7
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Mon Apr 07 15:49:00 2008 +0200
description:
Gendoc: removed code that tried to gather statistics over class members and
methods; Markup: bug fixed when getting back from a preformatted block to the
last indentation level

diffs (truncated from 201 to 100 lines):

diff -r 94bf4ec16b9c -r c62c9c5f67d7 tek/app/gendoc.lua
--- a/tek/app/gendoc.lua	Mon Apr 07 02:45:02 2008 +0200
+++ b/tek/app/gendoc.lua	Mon Apr 07 15:49:00 2008 +0200
@@ -115,9 +115,6 @@ function processfile(state, fname)
 	local superclass
 	local shortname
 	local version
-	local clade
-	local methods = { }
-	local members = { }
 
 	local documentation = { }
 	local ret, docfunc, args
@@ -225,27 +222,6 @@ function processfile(state, fname)
 				if not version then
 					version = line:match('^%s*_VERSION%s*=%s*"(.*)"%s*$')
 				end
-				if not clade then
-					clade = line:match('^%s*_CLADE%s*=%s*(.*)%s*$')
-				end
-				for m in line:gmatch("self%.([%w_]+)") do
-					local membername = classname .. "." .. m
-					if not members[m] then
-						local record = { name = m, fullname = membername, count = 0 }
-						members[m] = record
-					end
-					members[m].count = members[m].count + 1
-				end
-				for c, s, m in line:gmatch("(%w+)([.:])(%w+)%s*%(.*%)") do
-					if c:lower() == shortname:lower() then
-						shortname = c
-						local methodname = classname .. s .. m
-						if not methods[m] then
-							local record = { name = m, fullname = methodname, type = s }
-							methods[m] = record
-						end
-					end
-				end
 			end
 
 			break
@@ -254,19 +230,12 @@ function processfile(state, fname)
 	end
 
 	f:close()
-
-	-- methods overwrite equally named member variables:
-	for k in pairs(methods) do
-		members[k] = nil
-	end
 
 	if version then
 		version = version:match("^%D*%s+(%d+[%d.]*%.%d+)%s*$")
 		if not version then
 			io.stderr:write(("%s: _VERSION malformatted\n"):format(classname or fname))
 		end
--- 	else
--- 		io.stderr:write(("%s: Missing _VERSION string\n"):format(classname or fname))
 	end
 
 	local record = {
@@ -274,9 +243,6 @@ function processfile(state, fname)
 		ShortName = shortname,
 		SuperClass = superclass,
 		FileName = fname,
-		Members = members,
-		Methods = methods,
-		Clade = clade,
 		Version = version,
 	}
 
@@ -352,54 +318,6 @@ function dumpclasstree(state, tab, inden
 
 		insert(state.classdiagram, head)
 
-		if state.showmethods then
-			local is = ("  "):rep(indent)
-			-- methods:
-			local over = { }
-			local impl = { }
-			for _, m in pairs(data.Methods) do
-				if m.overwrites then
-					insert(over, m)
-				else
-					insert(impl, m)
-				end
-			end
-			if #impl > 0 then
-				print(is .. "  implements:")
-				sort(impl, sortfunc)
-				for _, e in ipairs(impl) do
-					local line = ("    %s%s()"):format(e.type, e.name)
-					print(is .. line)
-				end
-			end
-			if #over > 0 then
-				print(is .. "  overwrites:")
-				sort(over, sortfunc)
-				for _, e in ipairs(over) do
-					local line = ("    %s%s() [%s]"):format(e.type, e.name, e.overwrites)


More information about the tekui-devel mailing list