Skip to documentation
SLOP

tiny.choir.composition.source.provenance

Reference tiny.choir composition source provenance

Defined in composition.source.

API (5)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callscomposition.sourceprovenance
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callerscomposition.Provenanceinitcomposition.Provenanceclone
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callscomposition.Provenanceclonecomposition.Provenanceinit
Static calls · unresolved targets: 0 · external targets: 2.

Source: lib/choir/src/composition/source/provenance.zig

zig
const std = @import("std");const Allocator = std.mem.Allocator;pub const ProvenanceSpec = struct {    path: []const u8,    symbol: []const u8,    line: u32 = 0,    column: u32 = 0,};pub const Provenance = struct {    path: []const u8,    symbol: []const u8,    line: u32,    column: u32,    pub fn init(allocator: Allocator, spec: ProvenanceSpec) Allocator.Error!Provenance {        const path = try allocator.dupe(u8, spec.path);        errdefer allocator.free(path);        return .{            .path = path,            .symbol = try allocator.dupe(u8, spec.symbol),            .line = spec.line,            .column = spec.column,        };    }    pub fn clone(self: Provenance, allocator: Allocator) Allocator.Error!Provenance {        return try init(allocator, .{            .path = self.path,            .symbol = self.symbol,            .line = self.line,            .column = self.column,        });    }    pub fn deinit(self: *Provenance, allocator: Allocator) void {        allocator.free(self.symbol);        allocator.free(self.path);        self.* = undefined;    }};

Source: lib/choir/src/composition/source/root.zig:5

zig
pub const provenance = @import("provenance.zig");

Audit

Definitions6
Public names16
Members8
Version26.7.0
Revisiondaab053ee433