Old lalrpop-based compiler that was never finished. See link for new compiler
MIT License
Zypo is a new language focused on portability and developer needs
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.
/
- Main repositoryzypo-lib
(the main compiler library) and zypo
(the cli)zypo-rs
" (always lowercase in codeblock)/zypo-lib/
- Compiler libraryzypo-lib
" (always lowercase in codeblock)/zypo-cli/
- Main CLIzypo-cli
" (always lowercase in codeblock)./zypo
for linux or ./zypo.exe
for windows/examples/
- Zypo examples.zy
/Zypo code that are used in this README