summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/scripts/doxygen.lua
blob: 531210e7b4275719d3a691de8952d750b85a2c09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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