sunjay / brain

A high level programming language that compiles into the brainfuck esoteric programming language
MIT License
167 stars 12 forks source link

User Defined Structs #39

Open sunjay opened 7 years ago

sunjay commented 7 years ago

Support basic struct syntax including nested structs:

struct Foo {
    x: u8,
    y: u8,
}

struct Bar {
    pos: Foo,
    data: u8,
}

struct Unit;

Memory layout will likely be sequential though we shouldn't put any guarantees on ordering. This is essentially a way to group variables when passing them around to functions.