diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/init.lua | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/init.lua b/src/init.lua index fc57f24..bc921f2 100644 --- a/src/init.lua +++ b/src/init.lua @@ -1,10 +1,10 @@ #!/usr/bin/env lua --[[ -Mdoc creats documentation from comments in source files. +Mdoc creates documentation from comments in source files. Mdoc works in several steps: 1. Create "chunks" from input source files - 2. Create a dependnecy graph, so we only update the things that + 2. Create a dependency graph, so we only update the things that need updating 3. Output html documentation ]] @@ -13,6 +13,9 @@ local et = require("etlua") require("mdoc.ext") local opt = require("mdoc.opt") +--[[ +Parse arguments, if we can't run this tool, print a help menu and exit +]] local args = {...} local options = opt.parse_options(args) if options.help then @@ -215,6 +218,15 @@ local parse_between = { ["/***"] = "*/", ["--[[**"] = "]]" } +local comment_parsers = { + "doc.short_desc", + "doc.desc", + "doc.function", + "doc.tparam", + "doc.treturn" + "doc.method", + "doc.field", +} for _,file in pairs(state.files) do local cachefilename = string.format("%s/cache/files/%s",options.output,file.relpath) local cacheattrs = lfs.attributes(cachefilename) @@ -257,6 +269,11 @@ end for _,file in pairs(state.files) do local function process_chunk(chunk) assert(chunk.file and chunk.line, "Chunk without file or line num:") + local state = { + short_desc = "no short description provided", + desc = {}, + + } local section = nil local partname = nil local sectiontype = nil |
