an interpreted scripting language written in haxe
I made this to learn how interpreters work ok
it has the basics of a programming language, but it's still minimal, such as:
- variables
- functions (and return values)
- if, else, else if
- arithmetic and comparisons
- comments with //
// variables and arithmetic
x = 10;
y = 3;
result = x + y;
// functions
function greet(name) {
print(name);
return name;
}
// if / else if / else
if (result > 10) {
greet("big number");
} else if (result == 10) {
greet("exactly ten");
} else {
greet("small number");
}corecat@hx ~/idk> haxe test.hxml
[code.idk:8] big numberif for some reason you wanted to try the language, just put your idk code in code.idk and run haxe test.hxml