From eec2a2c96ea1dab91b30773513312977b747301a Mon Sep 17 00:00:00 2001 From: MrLetsplay Date: Fri, 29 Mar 2024 15:16:00 +0100 Subject: [PATCH] Update test files, Add stdlib alloc --- example/a.lang | 3 +++ example/b.lang | 3 +++ example/test.lang | 8 +++++--- stdlib/alloc.lang | 9 +++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 example/a.lang create mode 100644 example/b.lang create mode 100644 stdlib/alloc.lang diff --git a/example/a.lang b/example/a.lang new file mode 100644 index 0000000..7cb7044 --- /dev/null +++ b/example/a.lang @@ -0,0 +1,3 @@ +u8 a() { + return 1u8; +} diff --git a/example/b.lang b/example/b.lang new file mode 100644 index 0000000..e11241e --- /dev/null +++ b/example/b.lang @@ -0,0 +1,3 @@ +u8 b() { + return a() + 1u8; +} diff --git a/example/test.lang b/example/test.lang index 8b96e03..93c20ff 100644 --- a/example/test.lang +++ b/example/test.lang @@ -1,3 +1,5 @@ -void doNothing() { - u64 sus = 1u8; -} \ No newline at end of file +module sus; + +(u8, u8) a() { + return 1u8, 2u8; +} diff --git a/stdlib/alloc.lang b/stdlib/alloc.lang new file mode 100644 index 0000000..a352285 --- /dev/null +++ b/stdlib/alloc.lang @@ -0,0 +1,9 @@ +module alloc; + +u64 alloc(u64 size) { + return 0u64; +} + +void free(u64 address) { + +}