flush-lang is an interpreted programming language written in Rust.
You need git
(or you can download the zip project) and cargo
(for the build).
git clone https://github.com/flush-lang/flush
cd flush
cargo test
cargo install --path .
Show the current flush's version by using: flush --version
or flush -V
.
Run a file with: flush <path/to/file>
.
You can find all examples here.
def main() {
putStrLn("Hello, World!")
}
def fac(n) {
if (n <= 1) {
return 1
}
return n * fac(n - 1)
}
def fizz(n) {
if (0 == n % 15) {
putStrLn("FizzBuzz")
} else {
if (0 == n % 5) {
putStrLn("Buzz")
}
if (0 == n % 3) {
putStrLn("Fizz")
} else {
printLn(n)
}
}
}
Distributed under the MIT License. See license for more information.