tiny.chant.preprocess
Defined in tiny.chant.
API (7)
Actions
Public operations.
Types and contracts
Public types and contracts.
Namespaces
Public namespaces.
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);}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
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |