A jit interpreted language created by joachim barre
variable are i32 by default
the types are :
- i128
- i64
- i32
- i16
- i8
| extention | description |
|---|---|
| .joo | compiled jolang object |
| .jol | source code |
a source file currently looks like that:
// this is a line comment
/* block comment*/
builtin_function(arg1, arg2); // call to a builtin function
var varible; // variable declaration default value is zero
varible = input(); // variable assigment
if (varible == sqrt(4)) { // if statement
print(variable);
} else {
return 1;
}
var i = 0;
while(i <= 4) {
i = i + 1;
print(i*i);
}
loop {
var v = input();
print(v-1);
if ( v < 0 ) {
break; // exit the loop
}else
continue;
}
return 0; // exit the program with exit code 0
these builtin functions are currently available:
| name | arg count | description |
|---|---|---|
| 1 | print a variable to stdout | |
| input | 0 | read a variable from stdin |
| pow | 2 | first argument to the power of the second |
| randint | 2 | generate a random interger between arg1 and arg2 |
the generated binary object follow the format described in : bytecode_spec.md