Python Forum

Full Version: must the if statement in the following tutorial be nested?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in this tutorial series on creating a programming language:
https://www.youtube.com/watch?v=pWAxiKdJF0c  (the first episode in the video tutorial series)

he uses nested if statement,but can i use many if elif else statement instead.(especially the lexer)
If you could post the code in question here it would help a lot.
Tomorrow or the day after tomorrow because I am not at home now and my computer is at home.
At the point the elif checks tok to equal \ and then inside of that condition checks state to be 0 or 1
To not nest it could be replaced with two elif that check for tok and state at the same time.