From 53364ddc2e09362cb17432abf4fb598557554a9f Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 30 Oct 2021 11:42:13 +0800 Subject: + LDoc --- Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp | 201 +++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp (limited to 'Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp') diff --git a/Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp b/Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp new file mode 100644 index 0000000..7e4341b --- /dev/null +++ b/Data/Libraries/LDoc/tests/example/laurent/ldoc.ltp @@ -0,0 +1,201 @@ + + + + + $(ldoc.title) + + + + +
+ +
+ +
+
+
+ + +
+ +# local no_spaces = ldoc.no_spaces +# local use_li = ldoc.use_li +# local display_name = ldoc.display_name +# local iter = ldoc.modules.iter +# local M = ldoc.markup + + + + + +
+ +#if module then +

$(ldoc.titlecase(module.type)) $(module.name)

+# end + +# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries + $(ldoc.body) +# elseif module then -- module documentation +# ldoc.item = module -- context for M() +

$(M(module.summary))

+

$(M(module.description))

+ +# if not ldoc.no_summary then +# -- bang out the tables of item types for this module (e.g Functions, Tables, etc) +# for kind,items in module.kinds() do +

$(kind)

+ +# for item in items() do + + + + +# end -- for items +
$(display_name(item))$(M(item.summary))
+#end -- for kinds + +
+
+ +#end -- if not no_summary + +# --- currently works for both Functions and Tables. The params field either contains +# --- function parameters or table fields. +# local show_return = not ldoc.no_return_or_parms +# local show_parms = show_return +# for kind, items in module.kinds() do +

$(kind)

+ $(M(module.kinds:get_section_description(kind))) +
+# for item in items() do ldoc.item = item -- provides context for M() +
+ + $(display_name(item)) +
+
+ $(M(item.summary..'
'..(item.description or ''))) + +# if show_parms and item.params and #item.params > 0 then +

$(module.kinds:type_of(item).subnames):

+
    +# for p in iter(item.params) do +
  • $(p): $(M(item.params[p]))
  • +# end -- for +
+# end -- if params + +# if show_return and item.ret then +# local li,il = use_li(item.ret) +

Returns:

+
    +# for r in iter(item.ret) do + $(li)$(M(r))$(il) +# end -- for +
+# end -- if returns + +# if item.usage then +# local li,il = use_li(item.usage) +

Usage:

+
    +# for usage in iter(item.usage) do + $(li)
    $(usage)
    $(il) +# end -- for +
+# end -- if usage + +# if item.see then +# local li,il = use_li(item.see) +

see also:

+
    +# for see in iter(item.see) do + $(li)$(see.label)$(il) +# end -- for +
+# end -- if see +
+# end -- for items +
+# end -- for kinds + +# else -- if module; project-level contents + +# if ldoc.description then +

$(M(ldoc.description))

+# end + +# for kind, mods in ldoc.kinds() do +

$(kind)

+# kind = kind:lower() + +# for m in mods() do + + + + +# end -- for modules +
$(m.name)$(M(m.summary))
+# end -- for kinds +# end -- if module + +
+
+
+generated by LDoc +
+
+ + \ No newline at end of file -- cgit v1.1-26-g67d0