Issue #248 overeager error messages for module-level fields
Steve Donovan
7 years ago
297 | 297 | is_local = false |
298 | 298 | end |
299 | 299 | end |
300 | ||
300 | 301 | if item_follows or comment_contains_tags(comment,args) then |
301 | 302 | tags = extract_tags(comment,args) |
302 | 303 | |
324 | 325 | doc.expand_annotation_item(tags,current_item) |
325 | 326 | -- if the item has an explicit name or defined meaning |
326 | 327 | -- then don't continue to do any code analysis! |
327 | local field_or_param = (tags.field or tags.param) and not tags.class | |
328 | -- Watch out for the case where there are field or param tags | |
329 | -- but no class, since these will be fixed up later as module/class | |
330 | -- entities | |
331 | if (tags.field or tags.param) and not tags.class then | |
332 | parse_error = false | |
333 | end | |
328 | 334 | if tags.name then |
329 | 335 | if not tags.class then |
330 | 336 | F:warning("no type specified, assuming function: '"..tags.name.."'") |
349 | 355 | ldoc_comment = false |
350 | 356 | end |
351 | 357 | end |
352 | -- Watch out for the case where there are field or param tags | |
353 | -- but no class, since these will be fixed up later as module/class | |
354 | -- entities | |
355 | elseif parse_error and not field_or_param then | |
358 | end | |
359 | if parse_error then | |
356 | 360 | F:warning('definition cannot be parsed - '..parse_error) |
357 | 361 | end |
358 | 362 | end |