Ashok Gautham
d1755e7f16
Add meta viewport to fix mobile rendering, add missing <code> block
...
Co-authored-by: Vexu <git@vexu.eu>
2020-07-27 17:10:55 +03:00
data-man
3cdc0f104e
Vectors clarification in docs
2020-07-16 16:22:28 +03:00
Nathan Michaels
bc900cdeaf
Document top-level doc comments, per #2288 .
2020-07-13 22:57:23 +00:00
Andrew Kelley
fabdef44a8
Merge pull request #5831 from paulespinosa/langref-hello-world-more
...
Explain Language Ref's Hello World
2020-07-13 22:45:32 +00:00
Paul Espinosa
a8d8ce9733
Use Writer for Language Reference Hello World Example
...
`OutStream` has been deprecated, so the "Hello, World!" example has been
updated to use `Writer`.
2020-07-13 22:41:57 +00:00
Vexu
be1507a7af
update compile error tests and some doc comments
2020-07-12 00:54:07 +03:00
Vexu
8110639c79
add 'anytype' to stage1 and langref
2020-07-11 17:41:33 +03:00
Paul Espinosa
b45a2d72c8
Introduce Error Union and Use Writer
...
This commit edits the "Hello, World!" introduction. It introduces Error Union
Types. Also, it changes `outStream` to `writer` in the code example and description.
2020-07-11 18:08:00 +07:00
Paul
e57458a94f
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:10:08 +07:00
Paul
50df1334f3
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:57 +07:00
Paul
656b640e79
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:43 +07:00
Paul
5afa7f2545
Update doc/langref.html.in
...
Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
2020-07-11 09:09:07 +07:00
Paul Espinosa
f510f38592
Explain Language Ref's Hello World
...
To introduce the Zig programming language, the "Hello, world!" code sample now has
documentation to explain some of the features shown in the code sample
and contains links to those features in the rest of the documentation.
Writing style goals:
* Balance writing style to keep beginner and experience programmers interested.
* Be concise: allow the rest of the documentation to clarify language features.
2020-07-09 21:32:51 +07:00
Ryan Liptak
12a7dedb1f
langref: Expand "if error union with optional" test case
...
Follow-up to #5818 , closes #5819
2020-07-09 03:30:35 +00:00
xackus
2064e84cdd
ci: check langref.html for html errors
2020-07-08 19:34:44 +00:00
Ryan Liptak
f77c968cf8
langref: Add test case for "if error union with optional"
...
This is an edge case that isn't too uncommon but is rather confusing to try to deduce without documentation, since it feels like `else` is being overloaded in this scenario and there's no obvious 'correct' behavior here. This just adds a test demonstrating how Zig currently behaves in this scenario.
2020-07-08 19:32:15 +00:00
Paul Espinosa
eeae3a8f9d
Rename langref's Index to Contents (TOC)
...
The language reference's Index is a list of the documentation's contents in
order of appearance. This commit renames "Index" to "Contents" as in table of
contents. It also renames the HTML/CSS identifiers from "index" to "toc".
2020-07-08 19:31:38 +00:00
Andrew Kelley
3a89f214aa
update more HashMap API usage
2020-07-05 21:11:42 +00:00
Chris Watson
b8d5b3e611
Add documentation for @src() builtin
2020-07-01 22:22:30 +00:00
CodeMyst
7eed220924
in docs removed "path can be absolute" for imports
2020-07-01 22:12:44 +00:00
Alexandros Naskos
ff2ddcf38d
Updated @asyncCall docs
2020-06-24 19:01:38 +03:00
Jakub Konka
66e5205047
Refactor PreopenList.find()
...
This commit generalizes `std.fs.wasi.PreopenList.find(...)` allowing
search by `std.fs.wasi.PreopenType` union type rather than by dir
name. In the future releases of WASI, it is expected to have more
preopen types (or capabilities) than just directories. This commit
aligns itself with that vision.
This is a potentially breaking change. However, since `std.fs.wasi.PreopenList`
wasn't made part of any Zig release yet, I think we should be OK
to introduce those changes without pointing to any deprecations.
2020-06-23 21:54:36 +02:00
Sebastian
8527718350
langref - document that This works on enums too
2020-06-20 12:16:57 +01:00
Eleanor NB
605769ec25
Replaced all occurrences of std.debug.warn in the docs with std.debug.print
2020-06-19 19:03:37 -04:00
Andrew Kelley
866651a5a3
Merge pull request #5589 from kubkon/preopens-example
...
Add doc example for extracting WASI preopens
2020-06-12 13:40:30 -04:00
Veikka Tuominen
7d8fd45267
Merge pull request #5595 from ifreund/doc-arraylist-fix
...
docs: fix mention of deprecated ArrayList.span()
2020-06-12 19:10:47 +03:00
Isaac Freund
a254297953
docs: fix mention of deprecated ArrayList.span()
2020-06-12 17:58:43 +02:00
Jakub Konka
e4a8598ddd
Add doc example for extracting WASI preopens
2020-06-11 22:30:02 +02:00
Jakub Konka
42c95a64d6
Update langref.html.in
2020-06-09 00:22:34 -04:00
Jakub Konka
660eef9a43
Document the builtins
2020-06-09 00:22:34 -04:00
Andrew Kelley
2952604d5d
update docgen to new ast API
2020-05-23 20:40:09 -04:00
Vexu
758de71d97
Merge pull request #5353 from Vexu/parser
...
Self-hosted parser fixes
2020-05-16 15:56:03 +03:00
Vexu
b2f16d4484
fix infinite loop with mismatced bracket
2020-05-15 23:50:47 +03:00
Vexu
f8b99331a2
Merge pull request #5336 from Vexu/parser
...
Make self-hosted parser more error tolerant
2020-05-15 14:15:30 +03:00
Vexu
ac319b2734
remove useless nosuspend parsing
...
nosuspend cannot be used in a type expression and
all other use casesare covered by PrimaryExpr
2020-05-14 11:19:14 +03:00
Vexu
4b898893e2
Merge pull request #5254 from ifreund/top-level-struct-file-names
...
Apply naming conventions of structs to files
2020-05-13 19:28:14 +03:00
熊鑫
0363f3c6f3
mem.eql need slice type
2020-05-10 20:35:21 +08:00
Andrew Kelley
ba43492c0e
Merge pull request #5268 from tadeokondrak/remove-callconv-redundant-syntax
...
Remove syntax redundant with callconv
2020-05-07 12:42:26 -04:00
Lann
eb4fa63d3d
Remove reference to import type ( #5279 )
...
* Remove reference to import type
* Improve language in `@This()` doc
2020-05-05 19:13:35 -04:00
Tadeo Kondrak
84a0a9688c
update docs/tests for async/extern fn removal
2020-05-05 10:31:32 -06:00
Tadeo Kondrak
7ada59f873
remove nakedcc/stdcallcc/async fn/extern fn fnproto
2020-05-05 09:37:28 -06:00
Tadeo Kondrak
8d5636ebe4
Rename noasync to nosuspend in self-hosted, add rewriter
2020-05-05 05:17:33 -06:00
Isaac Freund
3a397795be
Apply naming conventions of structs to files
2020-05-02 23:28:44 +02:00
Andrew Kelley
5929e5ca0e
Merge pull request #5196 from tadeokondrak/@vector-to-@type-vector
...
`@Vector` -> `@Type(.Vector)`
2020-04-28 16:25:40 -04:00
Tadeo Kondrak
0673a8d576
Update language reference for std.meta.Vector
2020-04-28 00:47:14 -06:00
Tadeo Kondrak
2ef0795bfb
Update language reference for recent @Type changes
2020-04-28 00:02:14 -06:00
Andrew Kelley
448f8c2eb8
langref: add link to 0.6.0 version
2020-04-13 21:33:08 -04:00
Sören Tempel
6f5a7b8457
Update documentation of @panic
...
The default panic handler implementation was moved to `builtin.zig`.
2020-04-12 13:08:50 +02:00
Andrew Kelley
eefe6956fd
clarify what "not valid" means
2020-04-11 16:43:19 -04:00
emekoi
1a4f46ae7d
add note about @tagName
for non-exhaustive enums
2020-04-11 01:01:37 -05:00