Skip to content

vdchnsk/qrk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 qrk programming language

Parser implements Pratt parsing algorithm

Virtual machine is stack-based

📃 Code snippets

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"]();

🚀 How to run locally

  • 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"