Implement module section types "Constructors" (#32) #36
|
@ -9,8 +9,7 @@ local record Module_Doc
|
|||
|
||||
record_name: string
|
||||
|
||||
constructors: List<Function_Info.Function_Info> -- Translates to a list of methods
|
||||
constructor_param_record: List<Variable_Info.Variable_Info> -- Constructor with the __call metamethod and named parameters pattern
|
||||
constructors: List<Function_Info.Function_Info>
|
||||
|
||||
methods: List<Function_Info.Function_Info>
|
||||
properties: List<Variable_Info.Variable_Info>
|
||||
|
@ -22,7 +21,6 @@ local __Module_Doc: metatable<Module_Doc> = {
|
|||
__call = function(_: Module_Doc): Module_Doc
|
||||
return {
|
||||
constructors = List(),
|
||||
constructor_param_record = List(),
|
||||
methods = List(),
|
||||
properties = List(),
|
||||
static_functions = List(),
|
||||
|
|
|
@ -21,7 +21,12 @@ $(snippets.indent(snippets.render_record_functions(module.methods)))
|
|||
# if #module.properties ~= 0 then
|
||||
-- Object properties
|
||||
$(snippets.indent(snippets.render_record_properties(module.properties)))
|
||||
|
||||
# end -- /properties
|
||||
# if #module.constructors ~= 0 then
|
||||
-- Constructors
|
||||
$(snippets.indent(snippets.render_record_functions(module.constructors)))
|
||||
# end -- /constructors
|
||||
end
|
||||
|
||||
return $(module.record_name)
|
||||
|
|
Loading…
Reference in New Issue