mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Update IDL code generator
This commit is contained in:
21
scripts/doxygen.lua
Normal file
21
scripts/doxygen.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local idl = require "idl"
|
||||
|
||||
local doxygen = {}
|
||||
|
||||
function doxygen.load(filename)
|
||||
local lines = {}
|
||||
for line in io.lines(filename) do
|
||||
local code, comment = line:match "(.-)%-%-%-[ \t](.*)"
|
||||
if code then
|
||||
if code == "" then
|
||||
line = string.format("comment [[%s]]", comment)
|
||||
else
|
||||
line = string.format("%s [[%s]]", code, comment)
|
||||
end
|
||||
end
|
||||
lines[#lines+1] = line
|
||||
end
|
||||
return table.concat(lines, "\n")
|
||||
end
|
||||
|
||||
return doxygen
|
||||
Reference in New Issue
Block a user