4 releases

0.0.3 Oct 7, 2019
0.0.2 Oct 6, 2019
0.0.1 Oct 3, 2019
0.0.0 Oct 2, 2019

#30 in #welcome

MIT license

27KB
209 lines

zypo-rs

Welcome to the official reference compiler for the Zypo programming language!

Documentation


lib.rs:

Overview

zypo-rs is the official reference compiler for the Zypo programming language.

Objectives

  • Python inter-compatibility
  • Compiler portability (lightweight)
  • Fast compile speeds + optimizations
  • Markdown-friendly language (compiler logs and docstrings are markdown)

Installing

Pre-built binaries

A pre-built binary file for common Linux-based operating systems are available as job artifacts in the main repository. You can find the recently updated builds here.

Building from source

  1. Install Rust if you have not already.
  2. Clone the repository: git clone https://gitlab.com/zypo/zypo-rs/
  3. Build the compiler: cargo build --release.
  4. Get the resulting standalone binary: mv ./target/release/zypo-rs zypo-rs
  5. Run the binary: ./zypo-rs (NOTE: this depends on your operating system)

Language syntax

2 simple functions:

fun hello(other_int: int) {
    if (other_int == 5) {
        var x: int = 24;

        while(x / other_int != 2) {
            --snip--
        }
    }

    var result: str = "hello";
}

fun mul_x(first: int, second: int) -> bool {
    return first * second ==  6;
}

Dependencies

~5–7MB
~127K SLoC