I made my own programming language! You can find the replit template here. JumpLang is interpreted, and with limited testing, is faster than python.
Features
JumpLang has:
A semantic checker
Bytecode compiler
Bytecode interpreter
Basic int, float and bool ops
Echo keyword
Jump and flag keywords
Basic functions, with return
If statements
Examples
# Hello world
echo "Hello world"
# Add and divide
func addAndDiv(a, b):
num = a + b
return num / b
echo addAndDiv(6, 2)
# Factorials
func factorial(num):
current = num
result = 1
flag r
result = result * current
current = current - 1
if current <= 1:
return result
jump r
echo factorial(5)
echo factorial(10)
I havenāt worked on it in a while, and a lot of the keywords (yes itās keyword based, ew) Iām thinking of donāt seem to work with my setup, so Iāll have to definitely refactor a lot
Note that itās called āCustom Languageā since you can customize it