Skip to content

Commit 72bf9d9

Browse files
committed
Added builtin field to docs
1 parent 1b91478 commit 72bf9d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/langref.html.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4412,6 +4412,10 @@ fn add(a: i32, b: i32) i32 { return a + b; }
44124412
It does not include functions, variables, or constants.
44134413
</p>
44144414
{#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#}
44154419
{#header_open|@memberType#}
44164420
<pre><code class="zig">@memberType(comptime T: type, comptime index: usize) -&gt; type</code></pre>
44174421
<p>Returns the field type of a struct or union.</p>
@@ -6064,7 +6068,7 @@ hljs.registerLanguage("zig", function(t) {
60646068
a = t.IR + "\\s*\\(",
60656069
c = {
60666070
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",
60686072
literal: "true false null undefined"
60696073
},
60706074
n = [e, t.CLCM, t.CBCM, s, r];

0 commit comments

Comments
 (0)