why doesn't this print?
the print statement on line 40 in this code is just makin an empty line instead of printing what I want. But if I put it up onto line 33, it does print. Why is this?
you don't seem to be using correct
if statements. They seem to be getting mixed up with others.
one reason may be: Your python code is too cluttered, a way to fix this is to actually use the lex/parse method to create a language, and it is just way much easier to understand, I tried creating a language like this and it was extremeley hard when I got to if statements, functions, so on.
Another reason is maybe because there is something wrong with your elif statements
other than that i do not know
@Trex10 its kind of hard to explain, but just google it.
It basically takes the source code and the lexer turns it to tokens, then sends that to the parser and then the parser makes an ast, abstract syntax tree, then that goes to the compiler or interpreter, which then executes the code.
Yeah just google it