| ... | @@ -34,6 +34,7 @@ | ... | @@ -34,6 +34,7 @@ |
| 34 | <ul> | 34 | <ul> |
| 35 | <li><a href="#introduction">Introduction</a></li> | 35 | <li><a href="#introduction">Introduction</a></li> |
| 36 | <li><a href="#hello-world">Hello World</a></li> | 36 | <li><a href="#hello-world">Hello World</a></li> |
| | 37 | <li><a href="#source-encoding">Source Encoding</a></li> |
| 37 | <li><a href="#values">Values</a></li> | 38 | <li><a href="#values">Values</a></li> |
| 38 | <ul> | 39 | <ul> |
| 39 | <li><a href="#primitive-types">Primitive Types</a></li> | 40 | <li><a href="#primitive-types">Primitive Types</a></li> |
| ... | @@ -138,6 +139,7 @@ | ... | @@ -138,6 +139,7 @@ |
| 138 | <li><a href="#builtin-embedFile">@embedFile</a></li> | 139 | <li><a href="#builtin-embedFile">@embedFile</a></li> |
| 139 | <li><a href="#builtin-export">@export</a></li> | 140 | <li><a href="#builtin-export">@export</a></li> |
| 140 | <li><a href="#builtin-tagName">@tagName</a></li> | 141 | <li><a href="#builtin-tagName">@tagName</a></li> |
| | 142 | <li><a href="#builtin-TagType">@TagType</a></li> |
| 141 | <li><a href="#builtin-EnumTagType">@EnumTagType</a></li> | 143 | <li><a href="#builtin-EnumTagType">@EnumTagType</a></li> |
| 142 | <li><a href="#builtin-errorName">@errorName</a></li> | 144 | <li><a href="#builtin-errorName">@errorName</a></li> |
| 143 | <li><a href="#builtin-fence">@fence</a></li> | 145 | <li><a href="#builtin-fence">@fence</a></li> |
| ... | @@ -291,7 +293,7 @@ pub fn main() -&gt; %void { | ... | @@ -291,7 +293,7 @@ pub fn main() -&gt; %void { |
| 291 | <li><a href="#errors">Errors</a></li> | 293 | <li><a href="#errors">Errors</a></li> |
| 292 | <li><a href="#root-source-file">Root Source File</a></li> | 294 | <li><a href="#root-source-file">Root Source File</a></li> |
| 293 | </ul> | 295 | </ul> |
| 294 | <h2 id="values">Source encoding</h2> | 296 | <h2 id="source-encoding">Source Encoding</h2> |
| 295 | <p>Zig source code is encoded in UTF-8. An invalid UTF-8 byte sequence results in a compile error.</p> | 297 | <p>Zig source code is encoded in UTF-8. An invalid UTF-8 byte sequence results in a compile error.</p> |
| 296 | <p>Throughout all zig source code (including in comments), some codepoints are never allowed:</p> | 298 | <p>Throughout all zig source code (including in comments), some codepoints are never allowed:</p> |
| 297 | <ul> | 299 | <ul> |
| ... | @@ -4387,10 +4389,13 @@ test.zig:6:2: error: found compile log statement | ... | @@ -4387,10 +4389,13 @@ test.zig:6:2: error: found compile log statement |
| 4387 | <p> | 4389 | <p> |
| 4388 | Converts an enum value or union value to a slice of bytes representing the name. | 4390 | Converts an enum value or union value to a slice of bytes representing the name. |
| 4389 | </p> | 4391 | </p> |
| 4390 | <h3 id="builtin-EnumTagType">@EnumTagType</h3> | 4392 | <h3 id="builtin-TagType">@TagType</h3> |
| 4391 | <pre><code class="zig">@EnumTagType(T: type) -&gt; type</code></pre> | 4393 | <pre><code class="zig">@TagType(T: type) -&gt; type</code></pre> |
| 4392 | <p> | 4394 | <p> |
| 4393 | Returns the integer type that is used to store the enumeration value. | 4395 | For an enum, returns the integer type that is used to store the enumeration value. |
| | 4396 | </p> |
| | 4397 | <p> |
| | 4398 | For a union, returns the enum type that is used to store the tag value. |
| 4394 | </p> | 4399 | </p> |
| 4395 | <h3 id="builtin-errorName">@errorName</h3> | 4400 | <h3 id="builtin-errorName">@errorName</h3> |
| 4396 | <pre><code class="zig">@errorName(err: error) -&gt; []u8</code></pre> | 4401 | <pre><code class="zig">@errorName(err: error) -&gt; []u8</code></pre> |