Skip to documentation
SLOP

tiny.chant.preprocess

Reference tiny.chant preprocess

Defined in tiny.chant.

API (7)

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

No direct callersNo direct callstiny.chantpreprocess
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/chant/src/preprocess/run.zig:11

zig
pub fn run(    arena: std.mem.Allocator,    environ: std.process.Environ,    source_path: []const u8,    options: Options,    diagnostic: ?*types.Diagnostic,) Error![]const u8 {    var expander = try embed.Expander.init(arena, source_path, options);    const source = sys.fs.readFileAlloc(arena, source_path, max_source_bytes) catch |err| switch (err) {        error.OutOfMemory => return error.OutOfMemory,        else => return error.PreprocessFailed,    };    const prepared_source = try expander.prepare(source);    const prepared = if (expander.changed) try system.writeTemporary(arena, prepared_source) else types.Prepared{        .path = source_path,        .temporary = false,    };    defer if (prepared.temporary) sys.fs.cwd().deleteFile(sys.fs.debugIo(), prepared.path) catch {};    const preprocessed = try system.run(arena, environ, prepared.path, expander.source_dir, prepared.temporary, options, diagnostic);    return expander.expandOutput(preprocessed);}
Called byCallsNo direct callerspreprocess.embed.ExpanderexpandOutputpreprocess.embed.Expanderinitpreprocess.embed.Expanderpreparepreprocess.systemrunpreprocess.systemwriteTemporarypreprocessrun
Static calls · unresolved targets: 0 · external targets: 3.

Source: lib/chant/src/preprocess/root.zig

zig
const pipeline = @import("run.zig");pub const types = @import("types.zig");pub const embed = @import("embed.zig");pub const system = @import("system.zig");pub const Diagnostic = types.Diagnostic;pub const Error = types.Error;pub const Options = types.Options;pub const run = pipeline.run;

Source: lib/chant/src/root.zig:63

zig
pub const preprocess = @import("preprocess/root.zig");

Audit

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433