| Crates.io | kronk |
| lib.rs | kronk |
| version | 0.1.1 |
| created_at | 2025-03-24 10:56:39.389792+00 |
| updated_at | 2025-03-25 23:01:58.39662+00 |
| description | The Kronk interpreter - a silly, experimental language with surprisingly loud output |
| homepage | |
| repository | https://github.com/BradenEverson/kronk |
| max_upload_size | |
| id | 1603675 |
| size | 7,492 |
I don't know why I named it Kronk, but I did.
Kronk is a crazy ruled dynamically typed interpretted language with currently minimal feature support. It's pretty much just my experimental repo for playing around with parsing and executing language stuff
Kronk currently supports:
if statementswhile and for style loopsprinting and roaring
roar is a legendary and life changing keyword that will print your message to standard out more expressively than before. Instead of ending this expression in a semicolon, if must end with a bang !hello.kronk:
var foo = "Hello";
var bar = " World!";
roar foo + bar!
Execute using kronk hello.kronk:
$ kronk samples/hello.kronk
HELLO WORLD!!!!
Or even cooler, here's some nicer looking features that Kronk supports:
var flag = false;
for (var i = 1; !flag; i++) {
if (i == 50) {
print "done!";
var flag = true;
} else if (i == 25) {
print "halfway there!";
} else {
print i + "/50";
}
}
Kronk has support for tokenization and parser errors, they give helpful insight on what may be wrong in a program with syntax you don't know and docs that don't exist:
var foo = 1;
this is all valid but $ is not
Running the kronk interpretter over this will give us the error:
token error: Unrecognized token: `$`
-> samples/invalid_tokens.kronk:4:23
| this is all valid but $ is not
| ----------------------^
while (var foo = false) {
print "This file is super wrong"
};
Running kronk here will give us:
parser error: Unexpected token: `var`
-> samples/invalid_parser.kronk:1:10
| while (var foo = false) {
| ~~~
Fixing that error gives:
parser error: Expected `;` after `This file is super wrong`
-> samples/invalid_parser.kronk:2:35
| print "This file is super wrong"
| ~~~~~~~~~~~~~~~~~~~~~~~~~
And fixing that one gives:
parser error: Unexpected token: `;`
-> samples/invalid_parser.kronk:3:2
| };
| ~