steve donovan
5e87bcf400
serious .0 bug squashed! nocolon option to turn off colon-style detection. boilerplate option forces first comments to be ignored
2013-01-02 13:04:14 +02:00
steve donovan
9021b144b8
usage is now explicitly a multiline tag, so it is not considered part of the description. We are now ignoring Lua comments like so --- some text --- since they're commonly used to indicate logical sections - not for export
2012-12-31 17:02:40 +02:00
steve donovan
1bb83924bb
in implicit function style (a la Geoff) the first comment refers to the return value. In colon style, an exclamation mark allows a typename to be directly used as a 'tag'. The word 'optional' is only issued if we have either nil or a type
2012-12-31 14:52:00 +02:00
steve donovan
c49fa67644
more tests; styles meant as catalog of supported styles, submodule shows off within and submodule tag
2012-12-29 12:09:34 +02:00
steve donovan
29134ef169
tags as ordered maps; Geoff refactorings
2012-12-29 12:07:26 +02:00
steve donovan
cdebc952e4
usage section is now after returns: bumped vs to 1.3
2012-12-29 12:05:51 +02:00
steve donovan
a3aa4dc979
within tag working; allow description to appear after some tags (needed tags as ordered maps for this)
2012-12-29 12:04:39 +02:00
steve donovan
b039ac1574
fix for last Geoff patch (was asleep)
2012-12-28 11:00:10 +02:00
steve donovan
0f68f97513
added support for Luamark (Geoff)
2012-12-28 10:56:43 +02:00
steve donovan
4801a6ba10
export tag gives warnings if an item has not been documented
2012-12-22 16:29:42 +02:00
steve donovan
d51a8d63c9
tables may now have _any_ mix of field and param tags. Fixes hack to permit type macros in table definitions
2012-12-21 19:13:40 +02:00
steve donovan
f54e13185e
tag modifier code not respecting boolean types; export tag now properly makes local functions module-scope
2012-12-21 18:25:06 +02:00
steve donovan
3f70bd16f8
Ignore first non-doc comment (Geoff)
2012-12-21 18:23:18 +02:00
steve donovan
754da6e8d8
usage strings were not HTML-escaped properly (Eric)
2012-12-13 19:18:24 +02:00
steve donovan
8869cf4924
tparam macros can be used in table definitions
2012-12-13 19:17:32 +02:00
steve donovan
a551b47085
fallback for type macros in tables (starting). Use label suggested by custom lookup for type names
2012-12-13 15:01:33 +02:00
steve donovan
f4b164f24f
added --ignore flag (can be in config) to prevent LD from complaining about files with no docs. @submodule implemented
2012-12-10 14:45:54 +02:00
steve donovan
ac29c8e9c6
Added Geoff commit by hand: The table parser didn't handle tables with a trailing comment { a=1,
2012-12-10 09:39:12 +02:00
steve donovan
7f6835d253
pl.dir was not imported
2012-12-07 13:08:31 +02:00
steve donovan
5fbe6718ce
table field inference borked by recent changes; tests/simple/tables.lua is now behaving better
2012-11-11 18:50:33 +02:00
steve donovan
a560d75fde
relaxed argcheck-like style without at-signs; see example file
2012-11-08 19:09:59 +02:00
Geoff Leyland
2b304a2252
Use classes for formatting argument descriptions rather than tags
2012-10-29 13:26:07 +13:00
Geoff Leyland
9924e4dced
Parse type expressions like '?table|string' and turn them into 'optional table or string'
2012-10-29 13:24:49 +13:00
Geoff Leyland
90e87ece0c
Handle multi-line argument descriptions embedded in (and after) a function's formal parameters
2012-10-29 13:22:52 +13:00
Geoff Leyland
a2a3da455e
Remove requirement to have more than one formal argument when using comments on the arguments. I'm not sure what that was for, so I might have broken something
2012-10-29 13:17:44 +13:00
Geoff Leyland
53166f626f
Added a comple of missing requires
2012-10-29 13:14:54 +13:00
steve donovan
05727ec0cf
- comments within formal arguments: last comment may be outside the
...
closing parenthesis. If comments are of form TYPE:COMMENT then
equivalent to @tparam not @param. See tests/factory/mymod.lua
- @constructor tag attaches CLASS. as prefix to name
- No more implicit use of "require 'pl'".
2012-10-28 19:51:00 +02:00
steve donovan
f474eccdf8
factory-style classes: see tests/factory.lua
2012-08-22 12:50:57 +02:00
Alexander V. Nikolaev
78ffa7e651
Strip trailing whitespaces from output
2012-08-06 16:52:27 +00:00
Steve J Donovan
04c6922eeb
custom see references; Lua 5.2 issue sorted
2012-07-30 12:36:28 -04:00
steve donovan
578f4da1cf
now working with PL strict mode...
2012-03-23 14:21:43 +02:00
steve donovan
9bf51e3294
@ lookup can now happen on main page, and we now have a LuaRocks-agnostic way of finding builtin references
2012-03-19 19:07:11 +02:00
steve donovan
abd89a1ab8
builtin references are now .lua files for better LuaRocks integration
2012-03-19 15:04:16 +02:00
steve donovan
f9a778e33a
final tweaks to docs, pretty last-line problem
2012-03-19 13:09:01 +02:00
steve donovan
27fcd4d5fc
Do not resolve references when using -m. Can now use @treturn just with a type (pattern fix). Default dump more structured.
2012-03-17 12:17:22 +02:00
steve donovan
5b4fc640de
@lookup must be first thing; allow for shebang in scripts
2012-03-16 14:42:58 +02:00
steve donovan
9f314ea7fc
documentation overhaul
2012-03-16 14:41:26 +02:00
steve donovan
967dd60139
revamping docs; kind sort order in documents
2012-03-15 15:06:30 +02:00
steve donovan
d65ebf9ddf
1. Improved multiple Topic support; can refer to Sections
...
2. In output, similar animals of the same kind are moved to the front
3. 'content' div has fixed width of 700px
4. @lookup directive in documents
5. Irritating trailing line removed in prettified blocks
2012-03-14 11:38:54 +02:00
steve donovan
87f48c91d3
can now make references to sections (in their underscored form); parser will quietly bail out on empty files
2012-03-13 12:23:55 +02:00
steve donovan
9d0d12c31a
refs to Lua 5.2 docs (if we are using 5.2) and bumped up major version to 1.2
2012-03-13 10:37:07 +02:00
steve donovan
20ddca927d
added classes.lua to config.ld example in tests/
2012-03-06 10:41:19 +02:00
steve donovan
536ee894d2
do not prepend class qualifier (Fred:) if the name already contains it
2012-03-06 10:39:33 +02:00
steve donovan
cb7426005b
topics alias now ok; don't emit <code> with backtick-references; update types.lua example
2012-03-05 15:34:16 +02:00
steve donovan
3ed4e1f942
references in markdown-style backticks will be resolved, default true if using markdown. Set ldoc.backtick_references to be explicit.
2012-03-04 18:46:02 +02:00
steve donovan
38c8f187b3
improved varargs support; updated example to show this and tparam usage
2012-03-02 13:19:34 +02:00
steve donovan
ecd6b4cfa5
changes to varargs matching
2012-03-01 20:08:55 +02:00
steve donovan
725e49f50e
malformed ref check did not allow - (in example file names)
2012-01-09 14:07:24 +02:00
steve donovan
461fe4b711
fixed typo, dammit
2011-12-13 14:16:03 +02:00
steve donovan
fb5f5f290c
allow fallback from discount format to markdown
2011-12-12 15:48:35 +02:00
steve donovan
c0d7c6d0ac
clearer messages when switching to another directory
2011-12-12 13:15:04 +02:00
steve donovan
dcd62ffa9d
doc updates; problem with @usage with scripts; formal arguments now always take precendence; warnings cleaned up
2011-12-09 15:43:37 +02:00
steve donovan
69a952b76b
fallback troubleshooting code for now
2011-12-06 19:20:17 +02:00
steve donovan
70e1f22909
tparam/treturn aliases for type modifiers: display of types with standard template
2011-12-06 19:19:09 +02:00
steve donovan
3d8cdadc88
tried to access modifiers when not present
2011-10-04 15:54:08 +02:00
Fabien
0d1c4d1514
generic support for tag modifiers; modifiers "opt" and "optchain" for tag "param"
2011-10-04 14:54:08 +02:00
steve donovan
88326dc668
update builtin luadoc; tweaks to template
2011-09-22 15:48:09 +02:00
steve donovan
fbbdba7ecf
documenting customizing options; problem with no_summary fixed
2011-09-21 15:50:11 +02:00
steve donovan
746eecc979
doc updates: @plain for switching off code block prettification
2011-09-20 15:59:34 +02:00
steve donovan
4a0b997975
doc updates: escaping @{}
2011-09-20 14:11:31 +02:00
steve donovan
1dd35e86a0
great renaming: moved everything into ldoc module tree
2011-09-20 12:59:34 +02:00
steve donovan
a606f6305e
cleaned up some runaway table field detection code, which caused crashes with table items with no declared fields
2011-09-19 19:23:53 +02:00
steve donovan
6e941f576f
support for -- @usage shortcut
2011-09-19 15:53:00 +02:00
steve donovan
1a2e61a1f9
prettifying code in readme
2011-09-19 14:22:18 +02:00
steve donovan
40330487b0
@usage tag now works in module comments; annotations were borked
2011-09-19 13:34:01 +02:00
steve donovan
2b54ad1627
mark global functions and tables when prettifying code
2011-09-19 13:32:30 +02:00
steve donovan
dd881ddcf2
annotations have reference to main parent item
2011-09-18 20:45:36 +02:00
steve donovan
f5c11dcdf5
support for annotations: an item containing one of fixme, todo or warning can appear anywhere in code
2011-09-17 19:13:47 +02:00
steve donovan
c370529976
getting line numbers right for warnings in examples and topics; formatting function takes explicit item argument (no longer part of ldoc state)
2011-09-17 17:57:22 +02:00
steve donovan
74531d7106
presenting Lua methods as Class:name in a @type
2011-09-11 19:17:05 +02:00
steve donovan
e71f7d89ca
phoney error message when bad ref is in module summary sorted; no-doc-comment error now has line number
2011-08-28 15:37:06 +02:00
steve donovan
6832e1de2d
module not added with sensible line number - causes crash on warning
2011-08-27 10:11:41 +02:00
steve donovan
8d22dc7b2c
new flag --tags and some more builtin tags. So --tag fixme will show all occurances of @fixme in a project
2011-08-26 15:34:42 +02:00
steve donovan
daaf451a7e
LDoc warnings/errrors now use GCC format and are recognized by SciTE
2011-08-26 15:07:35 +02:00
steve donovan
2174f39191
Extended inline ref is now @{name|label}; colon gets confused with method operator
2011-08-25 19:02:06 +02:00
steve donovan
9d126aa2e7
lexer can crash nastily if called beyond end of stream: now always returns nil after the end
2011-08-25 19:00:43 +02:00
steve donovan
f1b7c894f7
_properly_ handle arb Lua block comments; now passes the embedded block comment test
2011-08-25 18:59:28 +02:00
steve donovan
f1bdccefd2
general Lua long comments allowed, e.g --[=[
2011-08-24 18:57:53 +02:00
steve donovan
7d9410f094
summary and description fields should now never be nil
2011-08-24 18:32:51 +02:00
steve donovan
8a5261424d
first sentence: ? or . followed by space, or two consecutive linefeeds
2011-08-22 13:26:27 +02:00
steve donovan
094852da4c
default template and style sheets now loaded as Lua modules, to get no-fuss LuaRocks install.
2011-08-22 12:54:32 +02:00
steve donovan
e680b44435
tweak to allowing space before :; do not strip linefeed after end of summary.
2011-08-21 18:50:58 +02:00
steve donovan
1befcc505c
problem with parsing explicit module() fixed
2011-08-21 17:29:56 +02:00
steve donovan
80e2e1e112
lorenzo's suggestion; may optionally provide text for the reference link using a colon
2011-08-21 17:25:28 +02:00
steve donovan
87784490fc
track line numbers in full text mode by counting linefeeds in spaces and comments
2011-08-21 17:23:58 +02:00
steve donovan
e265370400
lexer rewritten to return an object and not a coroutine. Methods like getline() and lineno() now work much better; sorts out problems encountered with Lua block comments
2011-08-14 11:54:40 +02:00
steve donovan
f5504a345a
quote strings in long comment blocks. This continues an already nasty hack which we need to retire pronto
2011-07-30 11:07:26 +02:00
steve donovan
9b373e36aa
need explicit 'extended_markdown' in config to do pre-processing. This feature is currently not working 100%
2011-07-30 11:06:42 +02:00
steve donovan
7fa4d6d9eb
if the doc item has an explicit name, don't try to deduce item further
2011-07-30 11:04:54 +02:00
steve donovan
75a6cf14da
line endings sorted out
2011-07-30 11:01:42 +02:00
steve donovan
85728c1947
some generalizations with extended code parsing
2011-07-29 15:55:28 +02:00
steve donovan
bedb89a307
initial blank line makes lexer give up
2011-07-29 15:54:23 +02:00
steve donovan
1dc062dafb
extending code inferrence patterns
2011-07-29 15:53:45 +02:00
steve donovan
88dbcd0d85
module(...) resolution wuz broke; parser needed args.package
2011-07-18 12:07:40 +02:00
steve donovan
0b181d3b66
ldoc.output was not set before the index
2011-07-14 15:27:16 +02:00
steve donovan
1735332b96
check_file now copies the file up if it is newer
2011-07-14 15:23:55 +02:00
steve donovan
da13ae5942
handle [=[...]=] comments and strings
2011-07-14 15:23:20 +02:00
steve donovan
a41792c56c
better support for one-column style
2011-07-12 15:42:58 +02:00
steve donovan
aae0c9a5d1
great refactoring: now also prettifies code in Markdown documents
2011-07-12 14:14:55 +02:00
steve donovan
788d8f24bd
Topics working with section references; cross-references starting to work
2011-07-11 15:40:44 +02:00
steve donovan
d864e49f47
lexer would hang on an empty file
2011-07-11 09:34:18 +02:00
steve donovan
42cb80be25
examples starting to work: factoring looking-up addresses out of template
2011-07-10 19:12:35 +02:00
steve donovan
7839a791ae
code reformat 4 to 3 spaces per indent
2011-07-10 19:10:53 +02:00
steve donovan
6935affe05
one-column stylesheet by Lorenzo; initial prettification for examples
2011-07-08 16:01:05 +02:00
steve donovan
acaa57c6b6
handling of strings was borked
2011-07-08 16:00:21 +02:00
steve donovan
684b5f350e
provision for looking up class method names; only explicit modules have their names adjusted for package.mod
2011-07-08 15:59:56 +02:00
steve donovan
4d718d3e86
Inline references are now @{ref}, not <ref>
2011-07-07 14:29:27 +02:00
steve donovan
e786e6beac
generalizations: <ref> can also be used w/out Markdown. Options to switch off various parts of the template
2011-07-06 15:24:05 +02:00
steve donovan
efd03cccb3
Markdown preprocess: consistently indented blocks are given paragraph break lines around them. Use ldoc.classic_markdown to switch off
2011-07-06 11:49:24 +02:00
steve donovan
99cfca7643
attempt to tame markdown.lua's need for blank lines around lists; it is not doing nested lists correctly (throwing in <p> inside <li>)
2011-07-05 18:53:28 +02:00
steve donovan
5e891d8d7c
Can now have <<REF>> inside Markdown-flavoured ldoc, which use the same rules for
...
REF as with @see references. References within a single module document must be
to the name of the document from args.output, not the module name.
2011-07-05 18:19:49 +02:00
steve donovan
e21db67984
factoring out custom markup processing
2011-07-05 16:30:49 +02:00
steve donovan
fb98cc767d
(1) pattern for @see references did not include underscore (2) hack for grabbing block comment foiled by '--]]'
2011-07-03 10:26:24 +02:00
steve donovan
3ca03ea818
lexer could not cope with zero length file
2011-06-21 18:30:57 +02:00
steve donovan
4fd3c78388
more useful message if template is not found: utils.quit() borked
2011-06-21 18:02:21 +02:00
steve donovan
7b69e259fd
workaround for PL bug on Windows with relative paths: path.normcase is borked
2011-06-21 17:47:48 +02:00
steve donovan
f55838ede0
keep a table of globals; used for ldoc -m and for resolving @see references to Lua standard library functions and tables
2011-06-19 17:52:02 +02:00
steve donovan
5c8a9d1e72
nasty typo caused crash on table definitions. (borked commit)
2011-06-18 11:45:45 +02:00
steve donovan
98b0617d34
module name inference (1) 'mod/init.lua' is 'mod' (2) either M or _M are used as default alias values for 'new-style' modules
2011-06-16 16:44:46 +02:00
steve donovan
ad2a350806
separate out language-specific parsing strategies
2011-06-16 11:09:24 +02:00
steve donovan
7c02820692
initial implementation of -all flag; default is to hide local functions from documentation
2011-06-15 16:33:13 +02:00
steve donovan
c57c364335
@local tag to flag a function explicitly as local
2011-06-15 16:12:56 +02:00
steve donovan
d4c04661ba
ldoc -m now falls back on the Lua documentation in builtin directory; concept of 'doc path' introduced.
2011-06-14 11:36:05 +02:00
steve donovan
e62bec5b81
complete moving source
2011-06-14 10:54:51 +02:00
steve donovan
19b0be5e71
moved modules to ldoc, templates to html
2011-06-14 10:52:10 +02:00