339 Commits

Author SHA1 Message Date
Loris Cro 83d1f6b15a autodoc: index in search usingnamespace decls 2023-04-13 17:38:52 +02:00
Loris Cro 602029bb2f Autodoc usingnamespace (#15216)
* autodoc: init support for usingnamespace decls

* autodoc: don't build autodoc when building zig2.c

* autodoc: usingnamespace decls support in frontend (#15203)

* autodoc: init support for usingnamespace decls

* autodoc: usingnamespace decls support in frontend

---------

Co-authored-by: Krzysztof Wolicki <46651553+der-teufel-programming@users.noreply.github.com>
2023-04-12 01:14:02 +00:00
Loris Cro 9cb2919d50 Merge pull request #15127 from der-teufel-programming/autodoc_newbuiltins
autodoc: Add new builtins to Autodoc
2023-03-31 17:30:09 +02:00
Krzysztof Wolicki b69578e19c autodoc: add new builtins 2023-03-31 11:47:14 +02:00
Krzysztof Wolicki Der Teufel 27d2848e00 autodoc: Add struct to tryResolveRefPath
fix rendering of fieldRef in exprName
2023-03-07 00:32:26 +01:00
r00ster91 d6bd00e855 Zir: move set_cold from Inst.Tag to Inst.Extended
If I could mark a builtin function as cold, I would mark @setCold as cold.
We have run out of `Zir.Inst.Tag`s so I had to move a tag from Zir.Inst.Tag to
Zir.Inst.Extended. This is because a new noreturn builtin will be added and
noreturn builtins cannot be part of Inst.Tag:
```
/// `noreturn` instructions may not go here; they must be part of the main `Tag` enum.
pub const Extended = enum(u16) {
```

Here's another reason I went for @setCold:
```
$ git grep setRuntimeSafety | wc -l
322
$ git grep setCold | wc -l
79
$ git grep setEvalBranchQuota | wc -l
82
```

This also simply removes @setCold from Autodoc and the docs frontend because
as far as I could understand it, builtins represented using Zir extended
instructions are not yet supported because I couldn't find
@setStackAlign or @setFloatMode there, either.
2023-03-03 21:16:21 +01:00
Loris Cro 99c11cc8cf Merge pull request #14544 from der-teufel-programming/autodoc-quickfixes
autodoc: main.js cleanup and formatting
2023-02-20 16:37:41 +01:00
Nguyễn Gia Phong b56d4f2150 autodoc: render ordered lists as such 2023-02-16 06:19:43 +09:00
Nguyễn Gia Phong e359308b2b autodoc: fix md list markers matching
Both original Markdown and CommonMark require at least one space or tab
between the list marker and any following content.  Following this allows
starting a line with a negative number or one with a decimal point.
2023-02-16 06:07:39 +09:00
Veikka Tuominen 7199d7c777 split @qualCast into @constCast and @volatileCast 2023-02-15 01:43:57 +02:00
Krzysztof Wolicki Der Teufel 14bf20daeb autodoc: anonymous struct type indentation fix 2023-02-10 14:32:45 +01:00
Krzysztof Wolicki Der Teufel 02bc6356d7 autodoc: main.js cleanup and formatting 2023-02-10 14:32:45 +01:00
Loris Cro 4c7f8286d5 autodoc: fix search regression 2023-02-03 18:05:07 +01:00
Krzysztof Wolicki Der Teufel c3abb63fe9 autodoc: Added @qualCast builtin function handling 2023-02-02 14:47:16 +01:00
Der Teufel e6cab917e1 autodoc: added support for tuple structs 2023-01-25 15:34:04 +01:00
Der Teufel dd8e16b906 autodoc: Add tag handling to enums and unions. Add support for Struct, Enum, Union types in exprName.
Anonymous types now work via a hack to ast_nodes.
2023-01-24 19:07:25 +01:00
Der Teufel da68e7f0cb autodoc: add html tags to "null" 2023-01-24 19:07:25 +01:00
Loris Cro af820bbb94 autodoc: init support for guides 2023-01-24 18:56:35 +01:00
Krzysztof Wolicki ae69dfe6e7 autodoc: Better handling of variable decls (#14301) 2023-01-16 17:28:07 +01:00
Clement Espeute 66569c7ec6 autodoc: use js instead of details for collapsing descriptions 2023-01-12 13:38:26 +01:00
Loris Cro 0e66df2094 autodoc: scroll up when collapsing long fn description 2023-01-11 18:14:56 +01:00
Der Teufel 669982c145 autodoc: Fix function pointers rendering issue 2023-01-11 03:31:16 +01:00
Clement Espeute b63a771e18 autodoc: allow function descriptions expansion 2023-01-10 18:55:49 +01:00
Loris Cro 18f6ef613c autodoc: improve linking of decl references
there are still some bugs to solve when a decl is re-exported but
straight-forward cases are handled correctly
2023-01-08 16:25:14 +01:00
Loris Cro 1878bdfbb1 autodoc: fix bodyless fn type analysis and rendering 2023-01-05 17:12:43 +01:00
Loris Cro c6ea551c7d autodoc: fix links to functions in generic types 2023-01-05 15:42:05 +01:00
Nguyễn Gia Phong c91adbbde7 autodoc: show binding in lowercase
<S-s> is not bound and shortcuts popup already use lowercase.
2023-01-03 15:11:44 +09:00
Der Teufel e48e612963 autodoc: Removed BoundFn from indexTypeKinds in main.js 2022-12-11 14:29:48 +01:00
Loris Cro 1696434063 Merge pull request #13300 from jcalabro/master
Better Autodoc Src File Links
2022-10-30 17:20:57 +01:00
Loris Cro d4487b6a2e autodoc: update to new func zir body structure
this is a hack meant to restore functionality for the upcoming release,
a proper analysis of the new zir structure is required to make a robust
change.
2022-10-30 17:17:34 +01:00
jcalabro f027f163cd better source file links 2022-10-25 10:36:47 -04:00
Andrew Kelley b120c819db Merge pull request #13055 from alichraghi/m2m
all: rename `@maximum` to `@max` and `@minimum` to `@min`
2022-10-18 14:42:55 -04:00
Ali Chraghi ca27055cda all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
jcalabro c8ca47dae7 add [src] links to function decls in autodocs 2022-10-09 20:47:28 -04:00
Der Teufel 55a9db4c9d autodoc: Added .html to generated source view file names 2022-09-26 15:46:01 +02:00
Loris Cro 2698cb346a autodoc: don't collect tests, usingnamespace and comptime blocks
Previously we were collecting as autodoc decls everything that was a ZIR
decl in a rather naive way. Now we only collect decltests as part of the
data relative to the decl they refer to, and ignore everything else.
2022-09-18 20:00:44 +02:00
Loris Cro 60678f5baf autodoc: fix regression in frontend rendering of values 2022-09-11 23:45:18 +02:00
Loris Cro 2a96f80d03 autodoc: reduce json payload size
this commit removes whitespace and changes Decl, AstNode and Type to be
json arrays instead of json objects. This change reduces json payload
size for the stdlib from 25mb to < 10mb.
2022-09-11 21:35:01 +02:00
Loris Cro 201dca323e autodoc: improve rendering of long fn signatures 2022-09-05 17:26:59 +02:00
Der Teufel b8001335c4 autodoc: Opaque now handled like other container types 2022-09-04 22:47:58 +02:00
Loris Cro dbd60e3d29 autodoc: add support for doc tests 2022-09-04 22:45:57 +02:00
Loris Cro 907c60aaa7 Merge pull request #12705 from der-teufel-programming/autodoc-big-int
Autodoc big_int
2022-09-02 17:48:17 +02:00
Loris Cro 70b96169ae Merge pull request #12709 from der-teufel-programming/autodoc-compare-operators
autodoc: Compare operators
2022-09-02 17:38:00 +02:00
Loris Cro 081d5a9690 autodoc: correct line number implementation
we also correctly take advantage of the starting byte offset of the
parent decl when calling `tree.tokenLocation()`!
2022-09-02 17:28:12 +02:00
Der Teufel 0d3c6b7aa8 autodoc: Added int_big support 2022-09-02 11:01:46 +02:00
Der Teufel 3bbf08e98a autodoc: Compare operators 2022-09-01 15:17:14 +02:00
Loris Cro e0103704c5 autodoc: better line counting for decls 2022-08-27 22:48:18 +02:00
Loris Cro 2e0ff6c700 Merge pull request #12600 from ominitay/autodocs-errorset
autodocs: improve error set rendering
2022-08-26 16:36:06 +02:00
Loris Cro a69a16c6bd Merge pull request #12601 from ominitay/autodocs-shortdesc
autodocs: improve first-line descriptions
2022-08-26 16:35:00 +02:00
ominitay b63667dda3 autodocs: improve first-line descriptions 2022-08-23 19:26:54 +01:00