如何使用 metalua 自动构建我的代码文档(如 doxygen)?
我想像这样的语法:
--> @ARG: a(number) first Number
--> @ARG: b(number) second Number
--> @RET: bool if a was greater than b
--> @RET: number sum of a and b
--> Add a and b while comparing their values
function addcmp(a,b)
return (a>b),(a+b)
end
要创建例如 HTML,例如:
<h1>addcmp</h1>
<i>Add a and b while comparing their values</i>
<h2>Arguments:</h2>
<ul>
<li><i>number</i> <b>a</b>: first Number</li>
<li><i>number</i> <b>b</b>: second Number</li>
</ul>
<h2>Returns:</h2>
<ul>
<li><i>bool</i>: if a was greater than b</li>
<li><i>number</i>: sum of a and b</li>
</ul>
当像这样调用时:
metalua -v sample.mlua -o sample.html --make-doc