Skip to content

whirl-lang/whirl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Whirl Programming Language

Test Status

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.

Releases

No releases published

Languages