Codebase list lua-ldoc / e71f7d8
phoney error message when bad ref is in module summary sorted; no-doc-comment error now has line number steve donovan 12 years ago
3 changed file(s) with 7 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
8787 # if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
8888 $(ldoc.body)
8989 # elseif module then -- module documentation
90 # ldoc.item = module -- context for M()
9091 <p>$(M(module.summary))</p>
9192 <p>$(M(module.description))</p>
9293
306306 os.exit(1)
307307 end
308308
309 Module.warning, Module.error = Item.warning, Item.error
310
309311 function Module:hunt_for_reference (packmod, modules)
310312 local mod_ref
311313 local package = self.package or ''
379381 -- and try to to resolve this.
380382 function Module:resolve_references(modules)
381383 local found = List()
382
383384 for item in self.items:iter() do
384385 local see = item.tags.see
385386 if see then -- this guy has @see references
8787
8888 function filename () return fname end
8989
90 function F:warning (msg,kind)
90 function F:warning (msg,kind,line)
9191 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')
9394 end
9495
9596 function F:error (msg)
182183 add_module(tags,module_found,old_style)
183184 tags = nil
184185 if not t then
185 io.stderr:write('warning: ',fname,' contains no items\n')
186 F:warning(fname,' contains no items\n','warning',1)
186187 break;
187188 end -- run out of file!
188189 -- if we did bump into a doc comment, then we can continue parsing it