aboutsummaryrefslogtreecommitdiff
path: root/src/dump_analysis.cpp
AgeCommit message (Collapse)Author
2019-10-09generated docs: more verbose fieldsAndrew Kelley
also prevent docs making hyperlinks for integer types
2019-10-08generated docs: error sets in fn docsAndrew Kelley
2019-10-08Add initial support for struct fields in the docsTimon Kruiper
2019-10-08generated docs: functions with inferred error sets display nicelyAndrew Kelley
infrastructure in place for displaying error sets
2019-10-08generated docs: bool type and fix error for some fnsAndrew Kelley
2019-10-08generated docs: function parameters have linksAndrew Kelley
2019-10-08generated docs contain generic instantiations and comptime callsAndrew Kelley
2019-10-07generated docs: show doc comments on functionsAndrew Kelley
2019-10-05generated docs: show public stuff onlyAndrew Kelley
2019-10-04proof of concept of stage1 doc generationAndrew Kelley
This commit adds `-fgenerate-docs` CLI option, and it outputs: * doc/index.html * doc/data.js * doc/main.js In this strategy, we have 1 static html page and 1 static javascript file, which loads the semantic analysis dump directly and renders it using dom manipulation. Currently, all it does is list the declarations. But there is a lot more data available to work with. The next step would be making the declarations hyperlinks, and handling page navigation. Another strategy would be to generate a static site with no javascript, based on the semantic analysis dump that zig now provides. I invite the Zig community to take on such a project. However this version which heavily relies on javascript will also be a direction explored. I also welcome contributors to improve the html, css, and javascript of what this commit started, as well as whatever improvements are necessary to the static analysis dumping code to provide more information. See #21.
2019-10-04stage1: fix compile error on macOS Xcode 11.1Michael Dusan
2019-10-03handle when std lib is unusedAndrew Kelley
2019-10-03add -fdump-analysis to dump type information to jsonAndrew Kelley
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.