summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-05-29 10:25:46 +0200
committerMattes D <github@xoft.cz>2016-07-18 22:11:37 +0200
commit61f76dd7a5c5efc7fad18acabb5fc67bb490226c (patch)
tree0f888c52c8410fb327cd9f3a52d5639457dd6342 /src/Bindings
parentBindings: Extract unexported DoxyComments. (diff)
downloadcuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar.gz
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar.bz2
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar.lz
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar.xz
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.tar.zst
cuberite-61f76dd7a5c5efc7fad18acabb5fc67bb490226c.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/BindingsProcessor.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Bindings/BindingsProcessor.lua b/src/Bindings/BindingsProcessor.lua
index 3ea7dff4f..417a8f48c 100644
--- a/src/Bindings/BindingsProcessor.lua
+++ b/src/Bindings/BindingsProcessor.lua
@@ -350,7 +350,11 @@ local function outputClassFunctionDocs(a_File, a_Class, a_Functions)
-- Output the descriptions:
a_File:write("\t\tFunctions =\n\t\t{\n")
for _, fn in ipairs(functions) do
- a_File:write("\t\t\t", fn.Name, " =\n\t\t\t{\n")
+ local name = fn.Name
+ if (name:sub(1, 1) == ".") then
+ name = "[\"" .. name .. "\"]"
+ end
+ a_File:write("\t\t\t", name, " =\n\t\t\t{\n")
for _, desc in ipairs(fn.Descs) do
a_File:write("\t\t\t\t{\n\t\t\t\t\tParams =\n\t\t\t\t\t{\n")
for _, param in ipairs(desc.Parameters) do
@@ -363,7 +367,7 @@ local function outputClassFunctionDocs(a_File, a_Class, a_Functions)
for _, ret in ipairs(desc.Returns) do
a_File:write("\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType = \"", ret.Type, "\",\n\t\t\t\t\t\t},\n")
end
- a_File:write("\t\t\t\t\t}\n")
+ a_File:write("\t\t\t\t\t},\n")
if (desc.DoxyComment) then
a_File:write("\t\t\t\t\tDesc = ", string.format("%q", desc.DoxyComment), ",\n")
end
@@ -565,7 +569,7 @@ local function outputClassDocs(a_Class, a_Functions, a_Variables, a_Constants, a
outputClassEnumDocs(f, a_Class, a_Class.enums)
-- Output the footer:
- f:write("\t}\n}\n")
+ f:write("\t},\n}\n")
f:close()
end