Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jakeroggenbuck/f09f-rs

pronounced fonf; is a statically typed language with simple but powerful syntax, and an interpreter written in rust
https://github.com/jakeroggenbuck/f09f-rs

language rust syntax

Last synced: 5 days ago
JSON representation

pronounced fonf; is a statically typed language with simple but powerful syntax, and an interpreter written in rust

Awesome Lists containing this project

README

        

# f09f-rs ![Rust](https://img.shields.io/github/workflow/status/jakeroggenbuck/f09f-rs/Rust?style=for-the-badge)
pronounced fonf; is a statically typed language with simple but powerful syntax, and an interpreter written in rust

# Install
```
git clone https://github.com/JakeRoggenbuck/f09f-rs
cargo install --path f09f-rs
```

# Usage
| Shorthand | Flag | Description |
|-----------|-------------|------------------------------------------------------------|
| -v | | Verbose output of tokens |

## Syntax
### Vars
```rb
int fact = 0;
prec dec = 0.2;
string this = "a string";
bool is_it = true;
```

### Functions
```rb
fun square(int n) returns int {
~ Return the square of n ~
return n ^ n;
}
```

### Control flow
```rb
if (n == 0) { n = 1; }

if (this and not that) {
x = 1;
}

if (this or that) {
x = 1;
}

if (this) {
that = false;
} else {
that = true;
}
```