# add \-fdump-analysis to dump type information to json · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/59ac7b91daed86af1ff03aceb7d9e9b8118e06ba)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 59ac7b91daed86af1ff03aceb7d9e9b8118e06ba

Requested commit: 59ac7b91daed86af1ff03aceb7d9e9b8118e06ba

Commit: 59ac7b91daed86af1ff03aceb7d9e9b8118e06ba

Tree: b6078f04125ca49bbb7a34e18c78be68e530d10f

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
add -fdump-analysis to dump type information to json

This commit adds -fdump-analysis which creates
a `$NAME-analysis.json` file with all of the finished
semantic analysis that the stage1 compiler produced.
It contains types, packages, declarations, and files.

This is an initial implementation; some data will be
missing. However it's easy to improve the implementation,
which is in `src/dump_analysis.cpp`.

The next step for #21 will be to create Zig code which parses
this json file and creates user-facing HTML documentation.

This feature has other uses, however; for example, it could
be used for IDE integration features until the self-hosted
compiler is available.

```

## Parents

- [7640bec8e0e735eaba49087840b7f6e6b2dd74ab](https://git.cafe/gitcafe/zig/commit/7640bec8e0e735eaba49087840b7f6e6b2dd74ab?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/59ac7b91daed86af1ff03aceb7d9e9b8118e06ba?format=markdown)
