~repos /plum

#treesitter#compiler#wasm

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

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



test/main.go



package main
const MIN_VALUE = -0x8000_0000_0000_0000 // Lowest value of Int
const MAX_VALUE = 0x7FFF_FFFF_FFFF_FFFF // Highest value of Int
const LARGE = 268435456 # 2**28
import (
"123"
)
type Game struct {
}
func random() Int {
a := 123
println("Hellow")
panic("TODO")
}
func fromStr() Result(Int, Err) {
return Ok(0)
}
func (i Int) toFloat() Float {
return FloatfromInt(i)
}
func (i Int) add(b: Int) Int {
return i + b
}
func (i Int) sub(b: Int) Int {
return i - b
}
func (i Int) abs() Int {
return i < 0 ? -i : i
}