Codebase list lua-ldoc / 1f21b5e
workaround for Lua file methods #157 Steve Donovan 10 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
7272 globals.set_manual_url 'http://www.lua.org/manual/5.1/manual.html'
7373 end
7474
75 local file_methods = {
76 close = true,
77 flush = true,
78 lines = true,
79 read = true,
80 seek = true,
81 setvbuf = true,
82 write = true,
83 }
84
7585 -- external libs tracked by LDoc using LDoc style
7686 local xlibs = {
7787 lfs='lfs.html', lpeg='lpeg.html',
8999 return nil
90100 end
91101 end
92 if tables[tbl] then -- function inside standard Lua table
102 if tbl == 'file' then -- special case: file objects!
103 if not file_methods[name] then
104 return nil
105 end
106 name = 'file:'..name
107 href = fun_ref..name
108 elseif tables[tbl] then -- function inside standard Lua table
93109 local t = rawget(_G,tbl) -- do a quick sanity check
94110 if not rawget(t,name) then
95111 return nil
1515 -- @string[opt='gregorian'] calender optional calendar
1616 -- @int[opt=0] offset optional offset
1717 -- @treturn string
18 -- @see file:write
1819 function one (name,age,...)
1920 end
2021