Draft specification, RFCs, reference registries and examples, plus the reference-implementation skeleton: build.zig, diagnostic envelope with error-code registry synced to docs, aji CLI, conformance runner with seed tests, CI and contributor docs.
31 lines
957 B
Zig
31 lines
957 B
Zig
//! Front door used by the CLI, the conformance runner and (later) `ajid`:
|
|
//! parse → verify, collecting diagnostics.
|
|
|
|
const std = @import("std");
|
|
const diag = @import("diag.zig");
|
|
|
|
pub const Status = enum {
|
|
/// Module verified; no error diagnostics.
|
|
accepted,
|
|
/// At least one error diagnostic.
|
|
rejected,
|
|
/// The pipeline cannot yet decide this input.
|
|
unimplemented,
|
|
};
|
|
|
|
pub const Report = struct {
|
|
status: Status,
|
|
diagnostics: []const diag.Diagnostic,
|
|
/// Pipeline stage that is missing when `status == .unimplemented`.
|
|
missing_stage: []const u8 = "",
|
|
};
|
|
|
|
/// Checks a text AIR module. All allocations go into `arena`.
|
|
pub fn checkAir(arena: std.mem.Allocator, file_name: []const u8, source: []const u8) !Report {
|
|
_ = arena;
|
|
_ = file_name;
|
|
_ = source;
|
|
// TODO(phase-0): air.parse → verifier.verify.
|
|
return .{ .status = .unimplemented, .diagnostics = &.{}, .missing_stage = "air.parse" };
|
|
}
|