Expand description
§Overview
zypo-rs
is the official reference compiler for the Zypo programming language.
§Objectives
- Python inter-compatibility
- Compiler portability (lightweight)
- Fast compile speeds + optimizations
- Markdown-friendly language (compiler logs and docstrings are markdown)
§Installing
§Pre-built binaries
A pre-built binary file for common Linux-based operating systems are available as job artifacts in the main repository. You can find the recently updated builds here.
§Building from source
- Install Rust if you have not already.
- Clone the repository:
git clone https://gitlab.com/zypo/zypo-rs/
- Build the compiler:
cargo build --release
. - Get the resulting standalone binary:
mv ./target/release/zypo-rs zypo-rs
- Run the binary:
./zypo-rs
(NOTE: this depends on your operating system)
§Language syntax
2 simple functions:
fun hello(other_int: int) {
if (other_int == 5) {
var x: int = 24;
while(x / other_int != 2) {
--snip--
}
}
var result: str = "hello";
}
fun mul_x(first: int, second: int) -> bool {
return first * second == 6;
}
Modules§
- CLI backend containing various small hooks to utility functions and small cli features.
- Parser module, containing the AST and type-checking hooked in.