Zypo is a new language focused on portability and developer needs ✨
- Dynamic typing
- Binary portability
- Static compilation
- Markdown-friendly (all compiler logs should be in markdown)
- Memory safe compiler (programs written are not memory safe!)
2 simple dummy functions:
fun hello(other_int) {
if(other_int == 5) {
var x = 24;
while(x / other_int != 2) {
--snip--
}
}
var result = "hello";
}
fun mul_x(first, second) {
return first * second == 6;
}
Fibonacci sequence:
fun fibonacci(stop_iteration) {
if (stop_iteration == (0 or 1)) {
return 0; -- return just 0 as user input is incorrect.
}
return fibonacci(stop_iteration - 1) + fibonacci(stop_iteration - 2);
}
You can find more code examples in the examples/
directory in the same path as this README!
Note: we use kotlin for markdown highlighting as Zypo highlighting is not supported just yet.. 🤞
In the sublevels are descriptions on each made part of this compiler.
- Contains general docs on the rest of zypo including setup and running
- Contains the 2 core Zypo modules,
zypo-lib
(the main compiler library) andzypo
(the cli) - Named "Zypo"/"The compiler" or if referencing in docs "
zypo-rs
" (always lowercase in codeblock)
- Named "The compiler library" or "
zypo-lib
" (always lowercase in codeblock) - Contains the main guts of the compiler and a simple API to connect outside code to multiple stages of the library
- Named "The CLI" or "
zypo-cli
" (always lowercase in codeblock) - The CLI the majority of people use to interact with Zypo
- On releasing the binary, the name is shortened to just
./zypo
for linux or./zypo.exe
for windows
- Contains some examples for
.zy
/Zypo code that are used in this README