ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

Internal LDoc error using @within

Open PedroAlvesV opened this issue 8 years ago • 1 comments
trafficstars

When using "Functions" as section title, with @within, I got this:

/home/pedroalves/Desktop/ex.lua:28: internal LDoc error
/usr/local/share/lua/5.3/ldoc/tools.lua:111: table index is nil
stack traceback:
	/usr/local/share/lua/5.3/ldoc/tools.lua:111: in method 'add'
	/usr/local/share/lua/5.3/ldoc/doc.lua:399: in method 'finish'
	/usr/local/share/lua/5.3/ldoc/parse.lua:435: in function </usr/local/share/lua/5.3/ldoc/parse.lua:435>
	[C]: in function 'xpcall'
	/usr/local/share/lua/5.3/ldoc/parse.lua:435: in function 'ldoc.parse.file'
	/usr/local/lib/luarocks/rocks-5.3/ldoc/1.4.6-2/bin/ldoc:414: in upvalue 'process_file'
	/usr/local/lib/luarocks/rocks-5.3/ldoc/1.4.6-2/bin/ldoc:469: in local 'process_all_files'
	/usr/local/lib/luarocks/rocks-5.3/ldoc/1.4.6-2/bin/ldoc:493: in main chunk
	[C]: in ?

This is the test case that produces the error above:

-------------------------------------------------
-- @module ex
-------------------------------------------------

-------------------------------------------------
-- @type Example
-------------------------------------------------
local Example = {
  -------------------------------------------------
  -- function 1
  -------------------------------------------------
  one = function(self)
    return
  end
}

-------------------------------------------------
-- function 2
--
-- @within Functions
--
-- @param param1
-- @param param2
-------------------------------------------------
function two()
  return
end

PedroAlvesV avatar Jan 11 '17 18:01 PedroAlvesV

Also, using @within Class Example produces a funny result.

PedroAlvesV avatar Jan 11 '17 18:01 PedroAlvesV