• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sile-typesetter / sile / 11170735472

03 Oct 2024 10:32PM UTC coverage: 58.612% (-4.5%) from 63.103%
11170735472

push

github

web-flow
Merge bcab25790 into 783083345

15 of 64 new or added lines in 5 files covered. (23.44%)

828 existing lines in 41 files now uncovered.

10478 of 17877 relevant lines covered (58.61%)

2029.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/outputters/ast.lua
NEW
1
local base = require("outputters.base")
×
NEW
2
local serpent = require("serpent")
×
3

NEW
4
local outputter = pl.class(base)
×
NEW
5
outputter._name = "ast"
×
NEW
6
outputter.extension = "ast"
×
7

8
local outfile
9

NEW
10
function outputter:_ensureInit ()
×
NEW
11
   if not outfile then
×
NEW
12
      local fname = self:getOutputFilename()
×
NEW
13
      outfile = fname == "-" and io.stdout or io.open(fname, "w+")
×
14
   end
15
end
16

NEW
17
function outputter:preProcess (ast)
×
NEW
18
   self:_ensureInit()
×
NEW
19
   local serialized = serpent.serialize(
×
20
      ast,
21
      {
22
         comment = false,
23
         compact = true,
24
         fatal = true,
25
         indent = "   ",
26
         metatostring = false,
27
         sortkeys = true,
28
         sparse = true,
29
      }
30
   )
NEW
31
   outfile:write(serialized)
×
32
   -- Only dump the *first* AST we're given dodging SILE generated ones (like folios) later
NEW
33
   self.preProcess = function () end
×
34
end
35

NEW
36
function outputter:finish ()
×
NEW
37
   self:runHooks("prefinish")
×
NEW
38
   outfile:close()
×
39
end
40

NEW
41
return outputter
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc