diff --git a/src/awesomewm.d.tl/generator/snippets.tl b/src/awesomewm.d.tl/generator/snippets.tl index 3937aae..c82b815 100644 --- a/src/awesomewm.d.tl/generator/snippets.tl +++ b/src/awesomewm.d.tl/generator/snippets.tl @@ -3,6 +3,7 @@ local List = require "pl.List" local stringx = require "pl.stringx" local template = require "pl.template" local utils = require "utils" +local Variable_Info = require "entity.Variable_Info" local snippets = {} @@ -44,6 +45,12 @@ function snippets.render_record_functions(items: List): string + return items:map(function(item: Variable_Info.Variable_Info): string + return snippets.render_typed_variable(item.name, item.types) + end):concat("\n") +end + function snippets.render_enum(name: string, values: List): string local tmpl = [[ enum $(name) diff --git a/src/awesomewm.d.tl/generator/teal_type_definitions.tl b/src/awesomewm.d.tl/generator/teal_type_definitions.tl index c96d66f..7fa2985 100644 --- a/src/awesomewm.d.tl/generator/teal_type_definitions.tl +++ b/src/awesomewm.d.tl/generator/teal_type_definitions.tl @@ -16,7 +16,12 @@ $(snippets.indent(snippets.render_enum("Signal", module.signals))) # if #module.methods then -- Object methods $(snippets.indent(snippets.render_record_functions(module.methods))) + # end -- /methods +# if #module.properties then + -- Object properties +$(snippets.indent(snippets.render_record_properties(module.properties))) +# end -- /properties end return $(module.record_name)