From 9add71365489cf21c07221e86f5705c6494c1efb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 16 Sep 2017 22:47:49 -0700 Subject: Moved ldoc.ltp from doc to tools. doc should be reserved for actual documents, I think. @tarleb - will this cause a problem? --- tools/ldoc.ltp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tools/ldoc.ltp (limited to 'tools') diff --git a/tools/ldoc.ltp b/tools/ldoc.ltp new file mode 100644 index 000000000..3fa96bb0f --- /dev/null +++ b/tools/ldoc.ltp @@ -0,0 +1,38 @@ +# local iter = ldoc.modules.iter +# local M = ldoc.markup + +

Module $(module.name)

+ +

$(M(module.summary))

+ +# for kind, items in module.kinds() do + +

$(kind)

+
+# for item in items() do ldoc.item = item -- provides context for M() +
$(ldoc.display_name(item))
+
+

$(item.summary)

+# if item.params and #item.params > 0 then + $(module.kinds:type_of(item).subnames): +
+# for p in iter(item.params) do +
$(p):
+
$(M(item.params.map[p]))
+# end -- for +
+# end -- if params +# if item.ret then +

Returns: $(item.ret[1])

+# end -- if returns +# if item.usage then +

Usage:

+
$(item.usage[1])
+# end -- if usage +# if item.see then + See also: $(item.see[1].label) + +# end -- if see +# end -- for items +
+# end -- for kinds -- cgit v1.2.3