Fri, 28 Dec 2018 04:41:09 -0500
Include line_start and line_end in action objects and action log events for /run end-point
main.lua | file | annotate | diff | comparison | revisions | |
scansion/parser.lua | file | annotate | diff | comparison | revisions |
--- a/main.lua Fri Dec 28 04:39:44 2018 -0500 +++ b/main.lua Fri Dec 28 04:41:09 2018 -0500 @@ -213,6 +213,8 @@ object_type = object.type; extra = action.extra; annotation = action.annotation; + line_start = action.line_start; + line_end = action.line_end; }); if action_timeout and action_timeout > 0 then
--- a/scansion/parser.lua Fri Dec 28 04:39:44 2018 -0500 +++ b/scansion/parser.lua Fri Dec 28 04:41:09 2018 -0500 @@ -31,6 +31,7 @@ last_object[k] = v; elseif #parsed.actions > 0 and line:sub(1,1) == "\t" then table.insert(parsed.actions[#parsed.actions].extra, line:sub(2)); + parsed.actions[#parsed.actions].line_end = line_number; elseif line:match("^%s*$") or line:match("^#") or line:match("^([/-])%1") then -- Blank line or comment local in_header = (next(parsed.objects) == nil) and (next(parsed.actions) == nil); @@ -78,6 +79,8 @@ action = action:lower(); extra = {#extra>0 and extra or nil}; annotation = annotation and table.concat(annotation, "\n") or nil; + line_start = line_number; + line_end = line_number; }); annotation = nil; end