Parser implements Pratt parsing algorithm
Virtual machine is stack-based
print("Goodbye universe!");
fn fibanacci(n) {
if n < 2 {
return n;
}
return fibanacci(n-2) + fibanacci(n-1);
}
fibanacci(42);
fn isAnswerOnTheLifeQuestion(answer) {
let expectedAnswer = 42;
return answer == expectedAnswer;
};
isAnswerOnTheLifeQuestion(69);
let person = {
"age": 10,
"live": fn() { print("living..."); },
};
person["live"]();
-
have go installed locally
-
install dependecies
go mod download
- launch REPL
make run
- or run code from a file with
.qrk
extension
make run FILE="example.qrk"