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.
18 lines
396 B
C++
18 lines
396 B
C++
/*
|
|
* Copyright (c) 2019 Andrew Kelley
|
|
*
|
|
* This file is part of zig, which is MIT licensed.
|
|
* See http://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#ifndef ZIG_DUMP_ANALYSIS_HPP
|
|
#define ZIG_DUMP_ANALYSIS_HPP
|
|
|
|
#include "all_types.hpp"
|
|
#include <stdio.h>
|
|
|
|
void zig_print_stack_report(CodeGen *g, FILE *f);
|
|
void zig_print_analysis_dump(CodeGen *g, FILE *f, const char *one_indent, const char *nl);
|
|
|
|
#endif
|