phoney error message when bad ref is in module summary sorted; no-doc-comment error now has line number
steve donovan
12 years ago
87 | 87 |
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
|
88 | 88 |
$(ldoc.body)
|
89 | 89 |
# elseif module then -- module documentation
|
|
90 |
# ldoc.item = module -- context for M()
|
90 | 91 |
<p>$(M(module.summary))</p>
|
91 | 92 |
<p>$(M(module.description))</p>
|
92 | 93 |
|
306 | 306 |
os.exit(1)
|
307 | 307 |
end
|
308 | 308 |
|
|
309 |
Module.warning, Module.error = Item.warning, Item.error
|
|
310 |
|
309 | 311 |
function Module:hunt_for_reference (packmod, modules)
|
310 | 312 |
local mod_ref
|
311 | 313 |
local package = self.package or ''
|
|
379 | 381 |
-- and try to to resolve this.
|
380 | 382 |
function Module:resolve_references(modules)
|
381 | 383 |
local found = List()
|
382 | |
|
383 | 384 |
for item in self.items:iter() do
|
384 | 385 |
local see = item.tags.see
|
385 | 386 |
if see then -- this guy has @see references
|
87 | 87 |
|
88 | 88 |
function filename () return fname end
|
89 | 89 |
|
90 | |
function F:warning (msg,kind)
|
|
90 |
function F:warning (msg,kind,line)
|
91 | 91 |
kind = kind or 'warning'
|
92 | |
io.stderr:write(kind..' '..fname..':'..lineno()..': '..msg,'\n')
|
|
92 |
line = line or lineno()
|
|
93 |
io.stderr:write(kind..' '..fname..':'..line..': '..msg,'\n')
|
93 | 94 |
end
|
94 | 95 |
|
95 | 96 |
function F:error (msg)
|
|
182 | 183 |
add_module(tags,module_found,old_style)
|
183 | 184 |
tags = nil
|
184 | 185 |
if not t then
|
185 | |
io.stderr:write('warning: ',fname,' contains no items\n')
|
|
186 |
F:warning(fname,' contains no items\n','warning',1)
|
186 | 187 |
break;
|
187 | 188 |
end -- run out of file!
|
188 | 189 |
-- if we did bump into a doc comment, then we can continue parsing it
|