Too heavy for its own good.
Important
Work in progress. You can refer to legacy tree walk interpreter implementation in Python for full language.
Experimental programming language with its own VM implemented in C.
./build.shThis creates 4 binaries: debug, release, valgrind & valgrind (with GC stress enabled)
Sample program(BST), create file named test.gus:
class Tree {
init(value) {
this.value = value; this.left = this.right = nil;
}
insert(value) {
if (value < this.value) {
if (this.left == nil) { this.left = Tree(value); }
else { this.left.insert(value); }
} else {
if (this.right == nil) { this.right = Tree(value); }
else { this.right.insert(value); }
}
}
}
fun binary_search(node, value) {
if (node == nil) return false;
if (node.value == value) return true;
if (value < node.value) return binary_search(node.left, value);
return binary_search(node.right, value);
}
var root = Tree(10);
root.insert(5); root.insert(15); root.insert(3); root.insert(7);
print Tree;
print root;
print binary_search(root, 7);
print binary_search(root, 15);
print binary_search(root, 12);
print binary_search(root, 5);[gustav] # ./target/gustav_release test.gus
Gustav v2.0 (May 17 2026 00:18:33) [ Debian Clang 19.1.7 (3+b1) ] | optimized RELEASE build for "Linux x86_64"
Tree
Tree<Instance>
true
true
false
trueInstall pytest via uv (or whataver):
uv tool install pytest
pytest -vv tests