diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-28 17:44:38 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-28 17:44:38 +0200 |
| commit | 956cd84ca545f1d93e2218cbbdbb39c81a46bec8 (patch) | |
| tree | 21e865b4af06acce77a0623ea5dd3a661306f21e /src/root.zig | |
| parent | df52109ff18ff354e4c0d1b003bc1a0a42c42b54 (diff) | |
implement other builtins
Diffstat (limited to 'src/root.zig')
| -rw-r--r-- | src/root.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/root.zig b/src/root.zig index 471267f..ff7e017 100644 --- a/src/root.zig +++ b/src/root.zig @@ -6,6 +6,9 @@ pub const Dict = @import("Dict.zig"); pub const Str = @import("Str.zig"); pub const Tuple = @import("Tuple.zig"); pub const Fn = @import("function.zig").Fn; +pub const Int = @import("Int.zig"); +pub const Float = @import("Float.zig"); +pub const List = @import("List.zig"); pub const Error = error { Exception, @@ -18,9 +21,9 @@ pub const conversion = struct { return *info.pointer.child; } - pub fn Ptr(value: anytype) Error!PtrFromCPtr(@TypeOf(value)) { - if (value) |ptr| { - return ptr; + pub fn ptr(value: anytype) Error!PtrFromCPtr(@TypeOf(value)) { + if (value) |p| { + return p; } return error.Exception; |