aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-23 01:25:15 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-05-23 01:25:15 +0330
commit948ab739464733f4e7690488db8a3491f0e3b5e2 (patch)
tree33b29534401a2de9da02bd4909e1a01031a99a41 /code
parent0b85ea4a7b64ed583aaf0e323252c5f792c042a2 (diff)
added native values instead of ast ones
Diffstat (limited to 'code')
-rw-r--r--code/main.felan34
1 files changed, 33 insertions, 1 deletions
diff --git a/code/main.felan b/code/main.felan
index 6c3ead5..9047fd2 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -7,7 +7,7 @@ print :: (comptime t:type,v:t)->void{
@putc('n');
};
-main :: () -> void {
+fun0 :: () -> void {
i := 0;
while true {
i += 1;
@@ -21,3 +21,35 @@ main :: () -> void {
print(u16,@cast(@cast(i,u8) + '0',u16));
}
};
+
+fun1 :: ()->void{
+ a :[20]u8 = undefined;
+ a[0] = '2';
+ @putc(a[0]);
+};
+
+fun2 :: ()->void{
+ b := '2';
+ c := &b;
+ d := &c;
+ d.*.* = '6';
+ @putc(b);
+ @putc(c.*);
+ @putc(d.*.*);
+};
+
+fun3 :: ()->void{
+ st :: struct{
+ a : i64;
+ };
+ a : st = undefined;
+ a.a = 2;
+ @putc(@cast(a.a,u8)+'0');
+};
+
+main :: ()->void{
+ fun0();
+ fun1();
+ fun2();
+ fun3();
+};