44 lines
1.9 KiB
Zig
44 lines
1.9 KiB
Zig
//! Tally calculation engine.
|
|
//!
|
|
//! Pure computation library with no I/O. Provides expression parsing,
|
|
//! evaluation, programmer-mode bit manipulation, struct layout computation,
|
|
//! unit conversion, and financial calculations.
|
|
|
|
pub const types = @import("types.zig");
|
|
pub const tokenizer = @import("tokenizer.zig");
|
|
pub const ast = @import("ast.zig");
|
|
pub const parser = @import("parser.zig");
|
|
pub const evaluator = @import("evaluator.zig");
|
|
pub const programmer = @import("programmer.zig");
|
|
pub const bitwise = @import("bitwise.zig");
|
|
pub const formatter = @import("formatter.zig");
|
|
pub const float_interp = @import("float_interp.zig");
|
|
pub const units = @import("units.zig");
|
|
pub const financial = @import("financial.zig");
|
|
// Exact numeric model (design.md 2.7). The evaluator computes in these.
|
|
pub const rational = @import("rational.zig");
|
|
pub const number = @import("number.zig");
|
|
|
|
// The modules above are the engine's surface: a caller writes `engine.units.convert`
|
|
// or `engine.financial.solveTvm`. The aliases below exist only for the handful of
|
|
// names used often enough that the module prefix is noise. There used to be a
|
|
// curated re-export of nearly every public declaration, which drifted: two thirds
|
|
// of it had no callers, and `Value` was re-exported after the type it named had
|
|
// stopped being the engine's result type.
|
|
pub const Mode = types.Mode;
|
|
pub const BitWidth = types.BitWidth;
|
|
pub const CalcError = types.CalcError;
|
|
pub const Environment = evaluator.Environment;
|
|
pub const evalString = evaluator.evalString;
|
|
pub const evalStringInfo = evaluator.evalStringInfo;
|
|
pub const evalProgrammerString = programmer.evalProgrammerString;
|
|
pub const FloatFormat = float_interp.FloatFormat;
|
|
pub const UnitCategory = units.UnitCategory;
|
|
pub const UnitDef = units.UnitDef;
|
|
pub const Number = number.Number;
|
|
|
|
test {
|
|
std.testing.refAllDecls(@This());
|
|
}
|
|
|
|
const std = @import("std");
|