aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2023-01-04Merge pull request #13786 from ziglang/tty-detectionVeikka Tuominen
stage2: make --color on affect progress bar too
2023-01-03docgen: handle 'K' and 'D' escape codesVeikka Tuominen
2023-01-03Document tuple syntaxEvin Yulo
Closes #13837
2022-12-29AstGen: make type sentinel expressions implicitly comptimeVeikka Tuominen
2022-12-27update uses of overflow arithmetic builtinsVeikka Tuominen
2022-12-27zig fmt: improve handling of comptime tuple fieldsVeikka Tuominen
2022-12-27langref: more explicitly document how enum overriding workszooster
2022-12-26update grammar in langrefVeikka Tuominen
Closes #14072
2022-12-19langref: add section numbersManlio Perillo
When reading a document with nested sections, it is not easy to discover the depth of the current section. Add support for nested section numbers, from the h2 to the h4 heading, in the format "lv1. ", "lv1.lv2. ", "lv1.lv2.lv3. ". The "Zig Version" and "Table of Content" sections are excluded. The section numbers are implemented in CSS, with the CSS rules declared inside a @media rule. Currently the @media rule targets all media.
2022-12-18Merge pull request #13914 from Vexu/variadicAndrew Kelley
implement defining C variadic functions
2022-12-18Merge pull request #13930 from r00ster91/renamingsVeikka Tuominen
std.builtin: renamings
2022-12-18langref: remove incorrect use of term 'literal'Evin Yulo
2022-12-17std.builtin: rename Type.UnionField and Type.StructField's field_type to typer00ster91
2022-12-17std.builtin: rename Type.Fn's args to paramsr00ster91
This was a poor naming choice; these are parameters, not arguments. Parameters specify what kind of arguments are expected, whereas the arguments are the actual values passed.
2022-12-17std.builtin: rename Type.Fn.Param's arg_type to typer00ster91
It's the type of a parameter, not an argument, but the prefix is redundant either way.
2022-12-17implement defining C variadic functionsVeikka Tuominen
2022-12-13Merge pull request #13907 from Vexu/call-mergeAndrew Kelley
Remove `stack` option from `@call`
2022-12-13Improve tagged union documentationEvin Yulo
closes #13870
2022-12-13langref: document extern variadic functionsManlio Perillo
Add a new subsection within the C section, documenting extern variadic functions.
2022-12-13langref: remove the trailing slash from the link elementManlio Perillo
A self-closing tag for void elements like link is only required under XHTML 1.0. See https://developer.mozilla.org/en-US/docs/Glossary/Void_element#self-closing_tags.
2022-12-13langref: add missing ReleaseSmall when describing unreachable (#13909)Manlio Perillo
Add a missing ReleaseSmall when describing unreachable in the try section and the unreachable entry in the Keyword Reference section. Additionally, transform Debug, ReleaseSafe, ReleaseFast and ReleaseSmall into links in the try section. Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2022-12-13langref: improve the test_fn_reflection.zig doctestManlio Perillo
Currently, the test_fn_reflection.zig doctest has an example of .Fn.is_var_args. This example can confuse the reader, since there is no documentation about variadic functions and is_var_args is mainly used in the compiler. Remove the example with .Fn.is_var_args and add instead examples with .Fn.return_type and .Fn.is_generic.
2022-12-13langref: fix the slice_bounds.zig doctestManlio Perillo
In the slice_bounds.zig doctest, the code "const slice = array[2..4]" is incorrect, since the actual type is a pointer to an array, instead of a slice. Use a runtime know value to slice the array.
2022-12-13langref: update comments in the slices.zig doctest (#13819)Manlio Perillo
In the slices.zig doctest, the code `const all_together_slice = all_together[0..]` is incorrect, since the actual type is a pointer to an array, instead of a slice. Use a runtime-known value to slice the array. In the next "slice pointer" test, clarify that slicing a slice to produce a pointer to an array, requires comptime-known indexes, not just constant indexes.
2022-12-13remove `stack` option from `@call`Veikka Tuominen
2022-12-12langref: avoid use of the term "enum variant" in enums.zig (#13847)gettsu
2022-12-12langref: improve the defer sectionManlio Perillo
Split the original `defer.zig` doctest into 3 doctest: 1. Document the defer keyword 2. Document that the return statement is not allowed inside a defer expression 3. Document the errdefer keyword Replace "method" with "expression" in the text `defer method`.
2022-12-10Merge pull request #13810 from r00ster91/oldAndrew Kelley
Re-enable many previously failing tests and add test coverage
2022-12-10langref: remove HTML code from a shell nodeManlio Perillo
Several <em> elements where added inside a shell node in the Using--target-and--cflags section. Remove them, since they are not supposed to be handled by codegen. For the original commit, see 0c091feb5 (Improve HTML semantics and a11y of language reference). Fixes #13846
2022-12-10behavior and langref: reenable previously-regressed tests on aarch64 and ↵r00ster91
powerpc64le Closes #3282
2022-12-10Merge pull request #13821 from Vexu/eliminate-bound-fnAndrew Kelley
Eliminate `BoundFn` type from the language
2022-12-10Remove unneeded `else unreachable` in docgen.zigEvin Yulo
See #707
2022-12-09Eliminate `BoundFn` type from the languageVeikka Tuominen
Closes #9484
2022-12-09langref: update anonymous struct namingEvin Yulo
Closes #13841
2022-12-09langref: consistently use comptime-known and runtime-knownManlio Perillo
2022-12-09langref: link "result location" to the "Result Location Semantics" sectionManlio Perillo
2022-12-06langref: update WASI preopens exampleAndrew Kelley
2022-12-01langref: eliminate dependencies on stage1Andrew Kelley
This commit removes async/await/suspend/resume from the language reference, as that feature does not yet work in the self-hosted compiler. We will be regressing this feature temporarily. Users of these language features should stick with 0.10.x with the `-fstage1` flag until they are restored. See tracking issue #6025.
2022-12-01langref: acknowledge design flaw in the self-hosted compilerAndrew Kelley
See tracking issue #13724
2022-11-29std.mem.Allocator: allow shrink to failAndrew Kelley
closes #13535
2022-11-29Sema: improve safety panic for access of inactive union fieldVeikka Tuominen
2022-11-17packed struct fix example and clarify least to most significant orderingJonathan Marler
The packed struct example was mistakenly applying endianness where it shouldn't have been. This wasn't being caught because we don't currently test the examples on Big-endian systems. I updated the test to remove the endianness where it didn't apply, and added a new part of the test to demonstrate when it would apply.
2022-11-12langref: add appendix and explain 'container' terminologyStevie Hryciw
2022-11-07langref.html.in: Simplify printing types in examplesGanesan Rajagopal
zig stdlib fmt has a formatter for types which prints the type name. So, just use @TypeOf(type) instead of the longer @typeInfo(@TypeOf(type)).
2022-11-04all: rename i386 to x86Ali Chraghi
2022-10-31Release 0.10.00.10.0Andrew Kelley
2022-10-30langref: mention `void{}` and empty blocksAndrew Kelley
closes #11112 closes #12496
2022-10-29Fix #12822: Clarify langref about the behavior of undefinedEvin Yulo
2022-10-26docgen: fix not escaping html in shell samplesAndrew Kelley
2022-10-18all: rename `@maximum` to `@max` and `@minimum` to `@min`Ali Chraghi