aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-04-19 21:48:09 +0200
committerJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-04-19 21:48:09 +0200
commit72bf9d90cc5fa4384ca7db1e5bbd4b9445e63bd3 (patch)
tree2d64dc990fb6897a33a99117c034f125e8a96800
parent1b91478bffa021721cff2c19a6c8389c7dcb3e1d (diff)
downloadzig-72bf9d90cc5fa4384ca7db1e5bbd4b9445e63bd3.tar.gz
zig-72bf9d90cc5fa4384ca7db1e5bbd4b9445e63bd3.zip
Added builtin field to docs
-rw-r--r--doc/langref.html.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index 034b8c1629..16fafdaad9 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -4412,6 +4412,10 @@ fn add(a: i32, b: i32) i32 { return a + b; }
It does not include functions, variables, or constants.
</p>
{#header_close#}
+ {#header_open|@field#}
+ <pre><code class="zig">@field(lhs: var, comptime field_name: []const u8) -&gt; (field)</code></pre>
+ <p>Preforms field access equivalent to <code>lhs.-&gtfield_name-&lt</code>.</p>
+ {#header_close#}
{#header_open|@memberType#}
<pre><code class="zig">@memberType(comptime T: type, comptime index: usize) -&gt; type</code></pre>
<p>Returns the field type of a struct or union.</p>
@@ -6064,7 +6068,7 @@ hljs.registerLanguage("zig", function(t) {
a = t.IR + "\\s*\\(",
c = {
keyword: "const align var extern stdcallcc nakedcc volatile export pub noalias inline struct packed enum union break return try catch test continue unreachable comptime and or asm defer errdefer if else switch while for fn use bool f32 f64 void type noreturn error i8 u8 i16 u16 i32 u32 i64 u64 isize usize i8w u8w i16w i32w u32w i64w u64w isizew usizew c_short c_ushort c_int c_uint c_long c_ulong c_longlong c_ulonglong",
- built_in: "atomicLoad breakpoint returnAddress frameAddress fieldParentPtr setFloatMode IntType OpaqueType compileError compileLog setCold setRuntimeSafety setEvalBranchQuota offsetOf memcpy inlineCall setGlobalLinkage setGlobalSection divTrunc divFloor enumTagName intToPtr ptrToInt panic canImplicitCast ptrCast bitCast rem mod memset sizeOf alignOf alignCast maxValue minValue memberCount memberName memberType typeOf addWithOverflow subWithOverflow mulWithOverflow shlWithOverflow shlExact shrExact cInclude cDefine cUndef ctz clz import cImport errorName embedFile cmpxchgStrong cmpxchgWeak fence divExact truncate atomicRmw sqrt",
+ built_in: "atomicLoad breakpoint returnAddress frameAddress fieldParentPtr setFloatMode IntType OpaqueType compileError compileLog setCold setRuntimeSafety setEvalBranchQuota offsetOf memcpy inlineCall setGlobalLinkage setGlobalSection divTrunc divFloor enumTagName intToPtr ptrToInt panic canImplicitCast ptrCast bitCast rem mod memset sizeOf alignOf alignCast maxValue minValue memberCount memberName memberType typeOf addWithOverflow subWithOverflow mulWithOverflow shlWithOverflow shlExact shrExact cInclude cDefine cUndef ctz clz import cImport errorName embedFile cmpxchgStrong cmpxchgWeak fence divExact truncate atomicRmw sqrt field",
literal: "true false null undefined"
},
n = [e, t.CLCM, t.CBCM, s, r];