Initial import: Aji 0.1 draft spec and Zig scaffolding
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.
This commit is contained in:
commit
17a55a7fef
67 files changed
+4197
No files matched your search
@@ -0,0 +1,30 @@
|
||||
//! 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" };
|
||||
}
|
||||
Reference in new issue
Block a user