sunjay / brain

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

Tagged Unions / Enums #41

Open sunjay opened 7 years ago

sunjay commented 7 years ago

Needs #39 and optionally #40 before implementation.

Support tagged unions / enums with arbitrary nesting.

enum Foo {}

enum Bar {
    Foo(Foo),
    NotFoo,
    DefinitelyNotFoo {a: u8, b: u8},
}

enum Direction {
     North,
     East,
     South,
     West,
}