https://github.com/matteopolak/quasi
A slightly off-putting interpreted programming language.
https://github.com/matteopolak/quasi
programming-language quasi rust
Last synced: about 1 month ago
JSON representation
A slightly off-putting interpreted programming language.
- Host: GitHub
- URL: https://github.com/matteopolak/quasi
- Owner: matteopolak
- License: mit
- Created: 2023-11-12T20:06:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-11T23:42:08.000Z (about 1 year ago)
- Last Synced: 2025-02-16T18:46:35.306Z (4 months ago)
- Topics: programming-language, quasi, rust
- Language: Rust
- Homepage: https://matteopolak.com/#quasi
- Size: 114 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quasi 🔮
Quasi (*/ˈkwāˌzī/*) is an interpreted programming language that's designed to be largely similar to most languages, but with slightly off-putting syntactical differences.
[](https://github.com/matteopolak/quasi/actions)
[](https://github.com/matteopolak/quasi/actions)## Quick links
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Syntax](#syntax)
- [Comments](#comments)
- [Variables](#variables)
- [Control flow](#control-flow)
- [Functions](#functions)## Installation
The binary name for Quasi is `quasi`.
Currently, building from source is the only way to install Quasi:
```bash
$ git clone https://github.com/matteopolak/quasi
$ cd quasi
$ cargo build --release
$ ./target/release/quasi --version
quasi 0.1.0
```## Usage
```bash
A slightly off-putting interpreted programming language.Usage: quasi
Arguments:
Path to the script to executeOptions:
-h, --help Print help
-V, --version Print version
```## Examples
Examples can be found in the [examples](examples) directory.
## Syntax
Quasi is a dynamically typed language and not whitespace sensitive.
### Comments
```py
# This is a comment
```### Variables
```rust
let x = 1;
let y = 2;
let z = x + y;
```### Control flow
```rust
if x == 1 [
print "x is 1";
] else if x == 2 [
print "x is 2";
] else
print "x is neither 1 nor 2";
``````rust
while x < 10 [
print x;
x = x + 1;
]
``````rust
for let i = 0; i < 10; i = i + 1 [
print i;
]
```### Functions
```rust
fn is_even(a) [
return a % 2 == 0;
]print is_even(10); # true
print is_even(15); # false
```### Shadowing
```rust
let x = 1;
let x = 2;print x; # 2
```