davidcallanan / py-myopl-code

Interpreter for the BASIC language written in Python 3
MIT License
469 stars 326 forks source link

Parser returning None #11

Open Infiniti20 opened 3 years ago

Infiniti20 commented 3 years ago

basic - Microsoft Visual Studio 2021-01-11 3_15_48 PM That's my code. Still not sure what's wrong. Any help is appreciated.

ibnsultan commented 3 years ago

with a fast check that I did, try to look at line 163 of your code, there is a typho

it's if tok.type ... instead of if tok.typw ...

Infiniti20 commented 3 years ago

with a fast check that I did, try to look at line 163 of your code, there is a typho

it's if tok.type ... instead of if tok.typw ...

It didn't fix it. I must have mistyped it when I was trying to redo the syntax. Same result.

ibnsultan commented 3 years ago

then there have to be a bunch of more other typos, please do attach the entire source code or provide a repository that I can reference from

sergiorivera50 commented 3 years ago

The boolean expression being evaluated at the while loop inside bin_op should be self.current_tok.type in ops instead of self.current_tok in ops.