diff --git a/src/awesomewm.d.tl/entity/Function_Info.tl b/src/awesomewm.d.tl/entity/Function_Info.tl index 19799fd..d3e3478 100644 --- a/src/awesomewm.d.tl/entity/Function_Info.tl +++ b/src/awesomewm.d.tl/entity/Function_Info.tl @@ -1,6 +1,8 @@ local List = require "pl.List" +local Map = require "pl.Map" local Type_Info = require "entity.Type_Info" local Variable_Info = require "entity.Variable_Info" +local utils = require "utils" local record Function_Info metamethod __call: function( @@ -28,6 +30,21 @@ local function fixup_parameters(self: Function_Info) end end +local function fixup_record_parameter(self: Function_Info) + for p in self.parameters:iter() do + for t in p.types:iter() do + if t.record_entries and + (t.record_entries as Map):len() > 0 then + t.name = string.format( + "%s_%s", + utils.capitalize(self.name), + utils.capitalize(t.name) + ) + end + end + end +end + local function fixup_return_types(self: Function_Info) for r in self.return_types:iter() do r:fixup() @@ -65,6 +82,7 @@ local __Function_Info: metatable = { fixup = function(self: Function_Info) fixup_parameters(self) + fixup_record_parameter(self) fixup_return_types(self) fixup_signal_type(self) end,