Please Note That This Happened In 2019 So I picked up a few things from then
So please don't judge me.
So I have decided to try and make a very basic language in python.
And it is pretty basic right now but I want to improve it.
And one thing all languages need: variables And right now I have this:
# Some other if statements up here
# neon is the name of the variable
# Something programmed real quickly to show example
elif neon[0:6] == ("addvar"):
var = neon[7:]
elif neon.startswith("add"+ var):
invar = neon.split("add"+ var , 1)[1]
elif neon.startswith("out"+ var):
print(invar)
YES it is very messy and horrid but I had to start with something and it is very buggy. I had to start working on math so I skipped out on the variables. I tried a few tests before e. g. Appending data to a list and whatnot.
My Problem:
It only lets me have one variable
But now I wonder if there is a way that finally goes through the lexer and parser