docs: remove references to %% prefix operator

also cleanup the table of contents
master
Andrew Kelley 2018-01-19 03:36:54 -05:00
parent ea623f2d39
commit 2c25c8aeed
1 changed files with 5 additions and 23 deletions

View File

@ -1018,21 +1018,6 @@ const unwrapped = value catch 1234;
unwrapped == 1234</code></pre>
</td>
</tr>
<tr>
<td><pre><code class="zig">%%a</code></pre></td>
<td>
<ul>
<li><a href="#errors">Error Unions</a></li>
</ul>
</td>
<td>Equivalent to:
<pre><code class="zig">a catch unreachable</code></pre>
</td>
<td>
<pre><code class="zig">const value: %u32 = 5678;
%%value == 5678</code></pre>
</td>
</tr>
<tr>
<td><pre><code class="zig">a and b<code></pre></td>
<td>
@ -1260,7 +1245,7 @@ const ptr = &amp;x;
{#header_close#}
{#header_open|Precedence#}
<pre><code>x() x[] x.y
!x -x -%x ~x *x &amp;x ?x %x %%x ??x
!x -x -%x ~x *x &amp;x ?x %x ??x
x{}
* / % ** *%
+ - ++ +% -%
@ -5218,9 +5203,8 @@ const c = @cImport({
<p>
You can mix Zig object files with any other object files that respect the C ABI. Example:
</p>
{#header_close#}
{#header_open|base64.zig#}
{#code_begin|obj#}
<p class="file">base64.zig</p>
{#code_begin|syntax#}
const base64 = @import("std").base64;
export fn decode_base_64(dest_ptr: &u8, dest_len: usize,
@ -5234,8 +5218,7 @@ export fn decode_base_64(dest_ptr: &u8, dest_len: usize,
return decoded_size;
}
{#code_end#}
{#header_close#}
{#header_open|test.c#}
<p class="file">test.c</p>
<pre><code class="cpp">// This header is generated by zig from base64.zig
#include "base64.h"
@ -5252,8 +5235,7 @@ int main(int argc, char **argv) {
return 0;
}</code></pre>
{#header_close#}
{#header_open|build.zig#}
<p class="file">build.zig</p>
{#code_begin|syntax#}
const Builder = @import("std").build.Builder;