From c91d3a8893b9c53c5c8e4c5cff72d7caf44cfee4 Mon Sep 17 00:00:00 2001
From: A404M <ahmadmahmoudiprogrammer@gmail.com>
Date: Fri, 30 May 2025 22:01:19 +0330
Subject: fixing some minor issues

---
 code/lib/operator.felan | 12 ++++++++++++
 code/lib/types.felan    |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

(limited to 'code/lib')

diff --git a/code/lib/operator.felan b/code/lib/operator.felan
index d8121c2..2112c57 100644
--- a/code/lib/operator.felan
+++ b/code/lib/operator.felan
@@ -790,3 +790,15 @@ __shift_right__ :: (left:i64,right:i64) -> i64 {
   return @shift_right(left,right);
 };
 
+
+//---------------------- Pointers ------------------------
+
+__sum__ :: (left:*anytype,right:i64) -> (@type_of(left)) {
+  return @add(left,right);
+};
+
+__sub__ :: (left:*anytype,right:i64) -> (@type_of(left)) {
+  return @sub(left,right);
+};
+
+
diff --git a/code/lib/types.felan b/code/lib/types.felan
index 8c0cbf1..df7f5c3 100644
--- a/code/lib/types.felan
+++ b/code/lib/types.felan
@@ -2,7 +2,7 @@ string :: []u8;
 
 array :: (comptime size:u64, comptime t:type) -> type {
   return struct {
-    ptr : t;
-    size : i32 : size;
+    ptr : *t;
+    size : @type_of(size) : size;
   };
 };
-- 
cgit v1.2.3