From a55db08a7b6326ea0d84f13acd9312d435c10136 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 7 Oct 2019 23:53:17 -0400 Subject: [PATCH] generated docs contain generic instantiations and comptime calls --- lib/std/debug.zig | 5 ++ lib/std/special/docs/index.html | 4 ++ lib/std/special/docs/main.js | 94 +++++++++++++++++++++++- lib/std/std.zig | 120 ++++++++++++++++--------------- src/all_types.hpp | 3 + src/analyze.cpp | 8 +++ src/dump_analysis.cpp | 122 +++++++++++++++++++++++++++++++- 7 files changed, 295 insertions(+), 61 deletions(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 25868d67a1..a6bc0fedf3 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -2439,3 +2439,8 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void { ); std.debug.warn("{} sp = 0x{x}\n", prefix, sp); } + +// Reference everything so it gets tested. +test "" { + _ = leb; +} diff --git a/lib/std/special/docs/index.html b/lib/std/special/docs/index.html index 77aece4f15..290acdb961 100644 --- a/lib/std/special/docs/index.html +++ b/lib/std/special/docs/index.html @@ -210,6 +210,10 @@

+ +