From f7d4ad2f7dd6bf64d13896d3409fde9b5437e374 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 26 Aug 2024 12:51:14 +0200 Subject: Added installation targets --- headers.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'headers.lua') 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 (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 -- cgit v1.1