~repos /plum

#treesitter#compiler#wasm

git clone https://pyrossh.dev/repos/plum.git

A statically typed, imperative programming language inspired by rust, python



tooling/tree-sitter-plum/test/highlight/sample.plum



module std
type Cat(ToStr) =
name: Str
age: Int
withName<Cat>(name: Str) -> Cat =
Cat(name: name, age: self.age)
withAge<Cat>(age: Int) -> Cat =
Cat(name: self.name, age: age)
toStr<Cat>() -> Str =
"Cat({self.name}, {self.age})"
main() =
printLn("Hello world")