The Whirl Programming Language
This is the main source code repository for Whirl. It contains the compiler, standard library, and documentation.
Quick links
Installation
Pre-built binaries can be found in the Releases section on GitHub. Otherwise, Whirl can be built from source.
git clone https://github.com/whirl-lang/whirl
cd whirl
go build cmd/whirl/main.go
Usage
A statically typed, compiled programming language.
Usage: whirl <PATH>
Arguments:
<PATH> Path to the script to execute
Options:
-h, --help Print help
-V, --version Print version
Examples
Examples can be found in the examples directory.
Dependencies
Whirl requires the Tiny C compiler to be downloaded on the system and added to the PATH.
Syntax
Comments
$ This is a comment
Variables
let x = 1;
let y = 2;
let z = x + y;
Control flow
if x == 1 {
printf("x is 1");
} else if x == 2 {
printf("x is 2")
} else {
printf("x is neither 1 or 2")
}
Functions
proc main() :: int {
escape 0;
}
License
Whirl is distributed under the MIT license. See LICENSE for more information.