Skip to content

corecathx/idk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idk

an interpreted scripting language written in haxe

I made this to learn how interpreters work ok

features

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 //

example

code.idk

// 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");
}

output

corecat@hx ~/idk> haxe test.hxml
[code.idk:8] big number

testing

if for some reason you wanted to try the language, just put your idk code in code.idk and run haxe test.hxml

About

an interpreted scripting language written in haxe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages