Tox is a statically typed version programming language that is written in rust.
Clone or download
Pull request Compare This branch is 70 commits behind master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
.vscode
frontend
interpreter
opcode
syntax
tests
tox
util
vm
.DS_Store
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
README.md
test.py

README.md

Grammar

Build Status

TOX

Tox is a statically typed version of lox that is written in rust.

Usage

USAGE:
    tox [FLAGS] [source]

FLAGS:
    -h, --help         Prints help information
    -i, --interpter    Run in interpreter mode
    -V, --version      Prints version information

ARGS:
    <source>    The source code file

Example Program

fn fib(n:int) -> int {
    if (n < 2) 
      return n;
    return fib(n - 2) + fib(n - 1);
}

A simple example that makes of uses of the classes

class Toggle {
    state:bool;
  
    fn value() -> bool {
      return this.state;
    }
  
    fn activate() -> Toggle {
      this.state = !this.state;
      return this;
    }
}
  
fn main() {
  var toggle  = Toggle{state:true};

  print toggle.activate().value();

  print toggle.activate().value();
}

TODO

[] Implement nested for while loops [x] Improve documentation [x] Fix variable scope [x] Readd inherited methods [ ] Finish the work on generic function calls [ ] Readd typechecking of closures

Resources