This is simply a compiler for a simple language, built with Python 3.6+ and the LLVM framework using the llvmlite library.
Install the requirements
pip install -r requirements.txt
These are all working perfectly
def fact(n:int):int{
if n <= 1{
return 1
}
return n * fact(n-1)
}
def main():int{
return fact(6)
}
def main():int{
age = 18
if age == 18{
printf('wow you are 18\n')
}else{
printf('i guess you are not 18\n')
}
return 0
}
def main():int{
printf('while loop\n')
x = 0
while x < 10{
printf('x = %i\n',x)
x = x+1
}
printf('Until loop\n')
x = 0
until x > 10{
printf('x = %i\n',x)
x = x+1
}
return 0
}
python run.py <filename>