structstd.zig.Zir.Inst.Declaration.Unwrapped[src]

Fields

src_node: Ast.Node.Index
src_line: u32
src_column: u32
kind: Kind
name: NullTerminatedString

Always .empty for kind of unnamed_test, .@"comptime", .@"usingnamespace".

is_pub: bool

Always false for kind of unnamed_test, .@"test", .decltest, .@"comptime".

is_threadlocal: bool

Always false for kind != .@"var".

linkage: Linkage

Always .normal for kind != .@"const" and kind != .@"var".

lib_name: NullTerminatedString

Always .empty for linkage != .@"extern".

type_body: ?[]const Inst.Index

Always populated for linkage == .@"extern".

align_body: ?[]const Inst.Index
linksection_body: ?[]const Inst.Index
addrspace_body: ?[]const Inst.Index
value_body: ?[]const Inst.Index

Always populated for linkage != .@"extern".

Source Code

Source code
pub const Unwrapped = struct {
    pub const Kind = enum {
        unnamed_test,
        @"test",
        decltest,
        @"comptime",
        @"usingnamespace",
        @"const",
        @"var",
    };

    pub const Linkage = enum {
        normal,
        @"extern",
        @"export",
    };

    src_node: Ast.Node.Index,

    src_line: u32,
    src_column: u32,

    kind: Kind,
    /// Always `.empty` for `kind` of `unnamed_test`, `.@"comptime"`, `.@"usingnamespace"`.
    name: NullTerminatedString,
    /// Always `false` for `kind` of `unnamed_test`, `.@"test"`, `.decltest`, `.@"comptime"`.
    is_pub: bool,
    /// Always `false` for `kind != .@"var"`.
    is_threadlocal: bool,
    /// Always `.normal` for `kind != .@"const" and kind != .@"var"`.
    linkage: Linkage,
    /// Always `.empty` for `linkage != .@"extern"`.
    lib_name: NullTerminatedString,

    /// Always populated for `linkage == .@"extern".
    type_body: ?[]const Inst.Index,
    align_body: ?[]const Inst.Index,
    linksection_body: ?[]const Inst.Index,
    addrspace_body: ?[]const Inst.Index,
    /// Always populated for `linkage != .@"extern".
    value_body: ?[]const Inst.Index,
}