View on GitHub


A toy programming language.

Running Comprehensive Tests


The Toy programming language is a procedural bytecode-intermediate interpreted language. It isn’t intended to operate on its own, but rather as part of another program, the “host”. This process is intended to allow a decent amount of easy customisation by the host’s end user, by exposing logic in script files. Alternatively, binary files in a custom format can be used as well.

The host will provide all of the extensions needed on a case-by-case basis. Script files have the .toy file extension, while binary files have the .tb file extension.

fn makeCounter() { //declare a function like this
	var total: int = 0; //declare a variable with a type like this

	fn counter(): int { //declare a return type like this
		return ++total;

	return counter; //closures are explicitly supported

var tally = makeCounter();

print tally(); //1
print tally(); //2
print tally(); //3

Nifty Features

Getting Started

Deep Dive

Public C API