diff options
Diffstat (limited to 'headers.lua')
-rwxr-xr-x | headers.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/headers.lua b/headers.lua index 290aca3..dc2c333 100755 --- a/headers.lua +++ b/headers.lua @@ -1,18 +1,11 @@ #!/usr/bin/env lua local args = require "pl.lapp" [[ Prints list of headers from a standard or available standards - -d (string default 'db/') Directory where definitions are placed + -d (optional string) Directory where definitions are placed <selection...> (optional string) Standard to display the headers for ]] local dir = require "pl.dir" -local parser = require "headers.parser".new() -local definitions = dir.getfiles(args.d, "*.lua") -for _, filename in pairs(definitions) do - local handle = io.open(filename) - local data = handle:read("a") - handle:close() - parser:parse(data) -end +local parser = require "headers.db".parse_all(args.d) if #args.selection > 0 then local headers = parser:get_headers(args.selection) if not headers then |