Toy language developed using Go's lexer/parser/ast/SSA/compiler as a basis
:: Program main
fn main() {
a := 1 + 2
print(a) // 3
}
type Foo struct {}
Foo :: fn Do(){}
fn main() {
foo := Foo{}
foo.Do()
}
Foo :: fn Do() {
print(it) // "it" refers to the copy of "Foo" passed into this method.
}
*Bar :: fn Do(){}
type Bar struct {
int fps
}
*Bar :: fn Do(){
// Read as "the val at (@) 'it' (where 'it' is a pointer of type Bar)"
@it.fps = 60
...
it.fps = 60 // Compile error. A pointer of type Bar does not have a field named "fps"
}