Commit Graph

6253 Commits

Author SHA1 Message Date
Andrew Kelley
ca3250a57c
generated docs: add global variables
See #3409
2019-10-08 22:39:12 -04:00
Andrew Kelley
cdaaf7c725
generated docs: consistent coloring 2019-10-08 19:04:35 -04:00
Andrew Kelley
e0f0e2aace
generated docs: error sets in fn docs 2019-10-08 18:09:08 -04:00
Timon Kruiper
f74c29b49a Add initial support for struct fields in the docs 2019-10-08 17:29:03 -04:00
Christine Dodrill
1e59eb3c94 src/main: minor grammar fix in the help for zig builtin 2019-10-08 15:14:10 -04:00
Andrew Kelley
784a493dc7
generated docs: functions with inferred error sets display nicely
infrastructure in place for displaying error sets
2019-10-08 13:41:13 -04:00
Andrew Kelley
03a6b33a73
generated docs: bool type and fix error for some fns 2019-10-08 11:59:55 -04:00
Andrew Kelley
6814d6b332
generated docs: function parameters have links 2019-10-08 11:52:06 -04:00
Andrew Kelley
a55db08a7b
generated docs contain generic instantiations and comptime calls 2019-10-08 00:15:16 -04:00
Andrew Kelley
ffc0c26b27
generated docs: highlight active package 2019-10-08 00:15:16 -04:00
Andrew Kelley
2e26aaa70c
generated docs: prioritized sort ranking 2019-10-08 00:15:14 -04:00
Andrew Kelley
7688100b17 stage1: enable PIC for libuserland
we don't really have a way to determine whether the stage1
zig compiler requires PIC so to be safe we always enable it
when building libuserland.

fixes build on some configurations of alpine linux.
2019-10-08 00:06:28 -04:00
Andrew Kelley
15471531d0
generated docs: sort search results 2019-10-07 18:17:06 -04:00
Andrew Kelley
478e53911d
generated docs: smart ignore case 2019-10-07 18:12:28 -04:00
Andrew Kelley
9df0d53981
generated docs: search cleanup 2019-10-07 18:00:01 -04:00
Andrew Kelley
4a97558ae8
generated docs: navigable search results 2019-10-07 17:46:22 -04:00
Andrew Kelley
d46234ef72
generated docs: keyboard shortcuts modal 2019-10-07 15:41:45 -04:00
Andrew Kelley
16de5a7228
generated docs: fix search stuff 2019-10-07 14:47:59 -04:00
Andrew Kelley
d70c30055e
generated docs: better navigation 2019-10-07 14:29:01 -04:00
Andrew Kelley
9237461b24
generated docs: logo and basic search proof of concept 2019-10-07 13:57:01 -04:00
Andrew Kelley
2ccb48ddc3
generated docs: show doc comments on functions 2019-10-07 12:21:11 -04:00
Andrew Kelley
85b8854c41
move doc/ to docs/
fixes regression caused by 86171afb9b
2019-10-07 11:31:47 -04:00
Matt Keeter
e706cc24f0 Fix typo in docs 2019-10-07 02:03:57 -04:00
Andrew Kelley
8e2c441b2e
stage1 parser supports doc comments 2019-10-06 16:39:27 -04:00
Andrew Kelley
86171afb9b
generated docs: docs/ instead of doc/
This appears to be more of a standard directory name.

See #21
2019-10-06 14:48:01 -04:00
Andrew Kelley
571123465b
generated docs: canonical package paths 2019-10-05 18:01:01 -04:00
Andrew Kelley
0e40fc46d1
generated docs: show public stuff only 2019-10-05 16:38:42 -04:00
Andrew Kelley
19c2474b34
generated docs: render functions 2019-10-05 16:38:42 -04:00
Michael Dusan
a82c6453c1
Merge pull request #3368 from mikdusan/issue.3367
fix: container member access `usingnamespace` decls fails
2019-10-05 15:47:07 -04:00
Andrew Kelley
edadccde54
generated docs: add navigation bar 2019-10-05 15:33:23 -04:00
Michael Dusan
a23a022820
fix container member access for fn/struct-fn
- decls brought in via `usingnamespace` were not always found
  because lookup was performed directly against decl_table and
  use_decls was never consulted
- fix to use find_container_decl() path instead
- closes #3367
2019-10-05 14:09:09 -04:00
Andrew Kelley
5aa1e78807
generated docs: navigable types 2019-10-05 13:29:35 -04:00
Andrew Kelley
f78d49c916
generated docs: navigable packages 2019-10-05 13:07:59 -04:00
Andrew Kelley
dca6e74fec proof of concept of stage1 doc generation
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-04 20:18:06 -04:00
Andrew Kelley
2f4dad04e0
langref: no viewport 2019-10-04 14:06:55 -04:00
Michael Dusan
81c6bd37aa stage1: fix compile error on macOS Xcode 11.1 2019-10-04 01:33:31 -04:00
Andrew Kelley
071af5c1d6
fix noreturn attribute for msvc 2019-10-03 22:51:00 -04:00
Andrew Kelley
eca2aa66fe
Merge pull request #3372 from ziglang/dump-analysis
add -fdump-analysis to dump type information to json
2019-10-03 18:37:30 -04:00
Andrew Kelley
39d47b2c51
handle when std lib is unused 2019-10-03 18:05:44 -04:00
Andrew Kelley
59ac7b91da
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.
2019-10-03 17:58:22 -04:00
LemonBoy
7640bec8e0 Fix pipe syscall for MIPS 2019-10-03 17:07:53 -04:00
Andrew Kelley
7481a4ad08
zig build: fix exe file ext to match target.cpp 2019-10-03 16:02:24 -04:00
Andrew Kelley
edef35bb57
docs: use the updated png favicon 2019-10-03 11:15:55 -04:00
Andrew Kelley
a7c9aa7ddb
finish conversion of translate_c.cpp to use zig_clang.h
See #1964

translate_c.cpp now exclusively uses the clang API via zig_clang.h

shaves off 5 seconds from building zig when translate_c.cpp
(or any h files it uses) change.
2019-10-02 19:21:40 -04:00
Andrew Kelley
f84086132f
more conversion of translate_c.cpp to use zig_clang.h
Progress: 96%

See #1964
2019-10-02 02:02:31 -04:00
Andrew Kelley
a8d6954c23
fix tripping LLVM assertion in const unions 2019-10-01 17:41:03 -04:00
Andrew Kelley
c1a05f0581
translate-c: make trans_implicit_cast_expr use zig_clang.h
See #1964
2019-10-01 17:33:11 -04:00
LemonBoy
17f2af10b5 Correct signal bits for MIPS
Also enable the segfault handler for all the supported architectures
beside MIPS.
2019-10-01 13:58:58 -04:00
SamTebbs33
bed4bfa69a Replace code occurences of --override-std-dir with --override-lib-dir 2019-10-01 07:29:24 -04:00
Andrew Kelley
5026db1d31
langref: add 0.5.0 docs link 2019-09-30 12:13:51 -04:00