Sign in Sign up
1 branch
README.md

newlang

#

A small statically typed language for Research Project:

Design and Implementation of a Rust-Based Compiler with Type Checking and Evaluation Mechanisms

install program:

#

You need cargo, available here rust-lang.

Install directly from github:

cargo install --git https:github.com/structwafel/public-newlang

OR:

  • Clone repo
  • Build program:
cargo build --release

This build the program to ./target/release/newlang

run a newlang program

#

Create a script file, with the extension .nl

and run with the first argument the filename:

./target/release/newlang <my-script-file.nl>

# or if moved / installed with cargo
./newlang <my-script-file.nl>

You can also build and run directly:

cargo run -- <my-script-file.nl>

footnote

#

File with most language features: https://github.com/structwafel/public-newlang/blob/main/files/example_two.nl

./files contains some small programs, not all are supposed to work