Merge pull request 'Implement module section types "Constructors" (#32)' (#36) from feat/#32 into master
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/docker-build Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details

Reviewed-on: #36
This commit is contained in:
Aire-One 2022-12-10 00:20:25 +01:00
commit f843940483
2 changed files with 6 additions and 3 deletions

View File

@ -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(),

View File

@ -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)