From 20ddca927db9eee630753564e29d588cc54e3bdf Mon Sep 17 00:00:00 2001 From: steve donovan Date: Tue, 6 Mar 2012 10:41:19 +0200 Subject: [PATCH] added classes.lua to config.ld example in tests/ --- ldoc/parse.lua | 2 -- tests/classes.lua | 25 +++++++++++++++++++++++++ tests/config.ld | 3 ++- tests/types.lua | 4 ++++ 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/classes.lua diff --git a/ldoc/parse.lua b/ldoc/parse.lua index d01273f..7dfb655 100644 --- a/ldoc/parse.lua +++ b/ldoc/parse.lua @@ -171,8 +171,6 @@ local function parse_file(fname,lang, package) end end --- if not t then break end -- no more file! - if t == 'space' then t,v = tnext(tok) end local item_follows, tags, is_local, case diff --git a/tests/classes.lua b/tests/classes.lua new file mode 100644 index 0000000..7b33b32 --- /dev/null +++ b/tests/classes.lua @@ -0,0 +1,25 @@ +---------------------- +-- a module containing some classes. +-- @module classes + +local _M = {} + +---- a useful class. +-- @type Bonzo + +_M.Bonzo = class() + +--- a method. +-- function one +function Bonzo:one() + +end + +--- a metamethod +-- function __tostring +function Bonzo:__tostring() + +end + +return M + diff --git a/tests/config.ld b/tests/config.ld index 6f63854..a539555 100644 --- a/tests/config.ld +++ b/tests/config.ld @@ -1,5 +1,6 @@ format='markdown' -file = 'types.lua' +file = {'types.lua','classes.lua'} +--file = 'classes.lua' topics = {'one.md','two.md'} tparam_alias 'string' tparam_alias ('int','number') diff --git a/tests/types.lua b/tests/types.lua index b508026..88b9e52 100644 --- a/tests/types.lua +++ b/tests/types.lua @@ -21,3 +21,7 @@ _M.mydata = { one = 1, -- alpha two = 2, -- beta } + + + +