This commit is contained in:
MCorange99
2024-03-07 17:37:38 +02:00
parent 9625256554
commit 5b51430df1
37 changed files with 2169 additions and 1019 deletions

4
playground/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/*
!/.gitignore
!/*.mcl
!/mclangc

13
playground/mclangc Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/bash
#? This is just a passthrough for the compiled mclangc binary for ease of use
#? It also compiles mclangc every time its ran
pushd ../ > /dev/null
cargo build --release -q
popd > /dev/null
../target/release/mclangc -I../include ${@:1}

35
playground/test.mcl Normal file
View File

@@ -0,0 +1,35 @@
include "std.mcl"
struct StatDef do
val -> u32
val2 -> i8
end
alloc Stat StatDef end
fn main with int ptr returns void then
// p l
"Hello!\n" puts
Stat.val 69 write32
Stat.val read32 _dbg_print
Stat.__size read32 _dbg_print
// memory fd 4 end
// NULL
// FS_O_RDWR
// c"/home/mcorange/@Projects/rust/programming_languages/mclang/mclangc/playground/test.mcl"
// fopen
// dup _dbg_print
// fd swap write32
done