Module:Module introspection: Difference between revisions
No edit summary |
mNo edit summary |
||
| Line 132: | Line 132: | ||
-- Helper function; builds the table of dependencies | -- Helper function; builds the table of dependencies | ||
-- All dependencies are included regardless of use | -- All dependencies are included regardless of use | ||
function p.make_dependency_table( | function p.make_dependency_table(deps, dep_functions) | ||
local dep_lines = {} | local dep_lines = {} | ||
| Line 171: | Line 171: | ||
-- Helper function | -- Helper function | ||
-- Lists module's own functions | -- Lists module's own functions | ||
function p.make_function_table( | function p.make_function_table(module_functions) | ||
-- Collapse table if it's larger than 20 lines | -- Collapse table if it's larger than 20 lines | ||
| Line 217: | Line 217: | ||
local deps = p.find_dependencies(preprocessed_content) | local deps = p.find_dependencies(preprocessed_content) | ||
local dep_functions = p.find_dependency_functions(preprocessed_content) | local dep_functions = p.find_dependency_functions(preprocessed_content) | ||
local dep_lines = p.make_dependency_table( | local dep_lines = p.make_dependency_table(deps, dep_functions) | ||
-- Get module's functions, then build a table using that information | -- Get module's functions, then build a table using that information | ||
local module_functions = p.find_functions(preprocessed_content) | local module_functions = p.find_functions(preprocessed_content) | ||
local func_lines = p.make_function_table( | local func_lines = p.make_function_table(module_functions) | ||
-- Return the tables as strings | -- Return the tables as strings | ||