IDL: Trim underscores.

This commit is contained in:
Бранимир Караџић 2019-07-04 10:50:29 -07:00
parent dd38cc10ce
commit 4127cc3ab1

View File

@ -146,14 +146,16 @@ local function FlagBlock(typ)
yield("{") yield("{")
for _, flag in ipairs(typ.flag) do for _, flag in ipairs(typ.flag) do
local flagName = flag.name:gsub("_", "")
yield("\t" yield("\t"
.. flag.name .. flagName
.. string.rep(" ", 22 - #(flag.name)) .. string.rep(" ", 22 - #(flagName))
.. " = " .. " = "
.. string.format(flag.format or format, flag.value) .. string.format(flag.format or format, flag.value)
.. "," .. ","
) )
end end
if typ.shift then if typ.shift then
yield("\t" yield("\t"
.. "Shift" .. "Shift"
@ -212,7 +214,7 @@ function converter.types(typ)
local lookup = combinedFlag.lookup or {} local lookup = combinedFlag.lookup or {}
combinedFlag.lookup = lookup combinedFlag.lookup = lookup
for _, flag in ipairs(typ.flag) do for _, flag in ipairs(typ.flag) do
local flagName = name .. flag.name local flagName = name .. flag.name:gsub("_", "")
local value = flag.value local value = flag.value
if value == nil then if value == nil then
-- It's a combined flag -- It's a combined flag