14 Commits (3fa0f65b54ae51dd11bdf1d1e3ff0343f34338f0)
 

Author SHA1 Message Date
alex 3fa0f65b54 output: insert empty line between container members
unfortunately, this spits out double newlines between top level
declarations and sometimes in between fields. this is because the
original rendering logic designed to handle a complete source file,
whereas we're printing only public members.

but this makes reading the output of container fields easier.
will take care of double newlines later.
2 years ago
alex dc51518b13 output: enable array literal rendering
can now compile the renderArrayInit with the TypeErasedWriter type of Ais,
added in the previous commit.

example: zdoc std.x.os.net IPv6
2 years ago
alex 56fe08fa7a output: use a comptime type-independent writer
all rendering functions output using Ais (AutoIndentingStream) which
writes to an std.fs.File.Writer but some commented out functions
like renderArrayInit need to use Ais to temporary output a partial
expression into an std.ArrayList(u8) buffer, making a new type of Ais
which renderExpression func cannot accept.

the new TypeErasedWriter abstracts the underlying writer away and so Ais
now always outputs to the same TypeErasedWriter.Writer type. in other
words, a single type of Ais should now satisfy all render functions.
2 years ago
alex b2d59f9f0e output: render unwrap_optional tags and comptime
some pub types are defined at compile time, based on the host properties.
example:

    zdoc std.x.os.socket
2 years ago
alex 8448fa079b output: render 'usingnamespace'
some constructs are imported using "pub usingnamespace". example:

    zdoc std.x
2 years ago
alex 054254c5ab output: enable container_field and aligned variant rendering
this was an oversight. should've enabled it from the start.
for example, IterableDir.Iterator defines an alighted buf:

    zdoc std.fs IterableDir
2 years ago
alex cd961b5dd6 output: enable switch case rendering
some pub const and vars may be defined using switch expressions.
example:

    zdoc std.fs.path sep
    zdoc std.fs.path sep_str
2 years ago
alex 0affa0b302 output: enable blocks and struct init rendering
some global pub vars are defined in blocks and use struct literals.
for example:

    zdoc std.testing allocator_instance
2 years ago
alex 40b8da106a readme: mention zig build test before sending a patch 2 years ago
alex 2a3b2d57d8 analyze: add a couple identifier matching tests 2 years ago
alex 4056c6dbcb build: add test subcommand
zig build test can now run tests defined in main.zig and all files it
imports due to std.testing.refAllDecls.
2 years ago
alex ba68c4a971 analyze: deinit AST once search in a file is done
arena allocator would take care of it upon program exit but deinit'ing earlier
may make a mem footprint difference when searching an arbitrary large
number of files.
2 years ago
alex 6c8e03ebd8 readme: mention unimplemented rendering output 2 years ago
alex 0a505782aa initial import 2 years ago