aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-31 15:15:27 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-31 15:15:27 +0330
commit3d221097f608d41603c4f475c764cfb42f509df6 (patch)
tree4a95f6fd94b766e8d0ef5cdaa955d933cbe03723
parentca6f2ec64941953f0111a64b7acf4cf6fb31929a (diff)
updated README.md
-rw-r--r--README.md2
-rw-r--r--code/main.felan17
2 files changed, 11 insertions, 8 deletions
diff --git a/README.md b/README.md
index da71662..40f0c2f 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,6 @@ main :: () -> void {
```
# TODO
-* Overloading [] operator
+* ~Overloading [] operator~
* Making \[n\]type = array(n,type)
* Making *type = ptr(type)
diff --git a/code/main.felan b/code/main.felan
index def8750..14368a3 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -1,7 +1,4 @@
-// @import("basic.felan");
-// @import("lib/memory.felan");
-@import("lib/operator.felan");
-@import("lib/types.felan");
+@import("basic.felan");
print :: (value:**anytype)->void{
if comptime @type_of(value.*) == u8 {
@@ -11,9 +8,15 @@ print :: (value:**anytype)->void{
}
};
+st :: struct {
+};
+
+__get_item__ :: (left:st,index:i64,index2:i64)->i64{
+ return index+index2;
+};
+
main :: () -> void {
- a : [23]u8 = undefined;
- a[0] = '2';
- @putc(a[0]);
+ a : st = undefined;
+ print(a[1,2]);
};