Avocado language is currently a "toy langauge" its mainly for learning how compilers work. It is in its early stages, still being powered by an interpreter. I have a long way to go before a v1.0.0 before that I need to implement several features.
This is a personal project so no pull requests will be accepted.
Typescript Compiler:
cd typescript_compiler
npm i
npm run test
npm run unit_tests
I want the langauge to be human readable while also being easy for an interpereter to understand. It looks alot like Typescript with a few differences.
-
scopes
{}
-
conditionals
?> a b
(greater than) -
if
if cond {}
-
ifnot
ifnot cond {}
-
else
else {}
-
else if
elif {}
-
conditional revamp
a > b
!(a > b)
50% done (need unary operators to work) -
while loops
while(cond) {}
-
break
break;
-
loops
loop {}
-
functions
func:type name(param) {}
-
compiler
Avolang:
var:char char_example = 'l';
var:int int_example = 10;
Typescript:
let char_example : string = "l";
let int_example : number = 10;
as you can see Avolang has stricter types
Avolang:
func:void print_AHHHH()
{
out.print("AHHHH");
}
Typescript:
function print_AHHHH() : void
{
console.log("AHHHH");
}