whirl-lang / whirl

Simple, fast, and compiled programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Simple, fast, and compiled programming language.

License:MIT License


Languages

Language:Go 100.0%