authorgravatar for jhc@dismail.deJimmi Holst Christensen <jhc@dismail.de> 2018-04-19 21:48:09+02:00
committergravatar for jhc@dismail.deJimmi Holst Christensen <jhc@dismail.de> 2018-04-19 21:48:09+02:00
log72bf9d90cc5fa4384ca7db1e5bbd4b9445e63bd3
tree2d64dc990fb6897a33a99117c034f125e8a96800
parent1b91478bffa021721cff2c19a6c8389c7dcb3e1d

Added builtin field to docs


1 files changed, 5 insertions(+), 1 deletions(-)

doc/langref.html.in+5-1
...@@ -4412,6 +4412,10 @@ fn add(a: i32, b: i32) i32 { return a + b; }...@@ -4412,6 +4412,10 @@ fn add(a: i32, b: i32) i32 { return a + b; }
4412 It does not include functions, variables, or constants.4412 It does not include functions, variables, or constants.
4413 </p>4413 </p>
4414 {#header_close#}4414 {#header_close#}
4415 {#header_open|@field#}
4416 <pre><code class="zig">@field(lhs: var, comptime field_name: []const u8) -&gt; (field)</code></pre>
4417 <p>Preforms field access equivalent to <code>lhs.-&gtfield_name-&lt</code>.</p>
4418 {#header_close#}
4415 {#header_open|@memberType#}4419 {#header_open|@memberType#}
4416 <pre><code class="zig">@memberType(comptime T: type, comptime index: usize) -&gt; type</code></pre>4420 <pre><code class="zig">@memberType(comptime T: type, comptime index: usize) -&gt; type</code></pre>
4417 <p>Returns the field type of a struct or union.</p>4421 <p>Returns the field type of a struct or union.</p>
...@@ -6064,7 +6068,7 @@ hljs.registerLanguage("zig", function(t) {...@@ -6064,7 +6068,7 @@ hljs.registerLanguage("zig", function(t) {
6064 a = t.IR + "\\s*\\(",6068 a = t.IR + "\\s*\\(",
6065 c = {6069 c = {
6066 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",6070 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",
6067 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",6071 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",
6068 literal: "true false null undefined"6072 literal: "true false null undefined"
6069 },6073 },
6070 n = [e, t.CLCM, t.CBCM, s, r];6074 n = [e, t.CLCM, t.CBCM, s, r];