20.18 Parser error

#1

is anyone else getting an “unresolved identifier error” on the lines with “Parser” in them. Is that error the result of declaring the Parser class in the wrong location?

#2

This chapter’s code should be in a Playground. Remember that Playgrounds execute top to bottom by default. So, if you refer to the Parser class above that class’s implementation, then the Playground will issue this error. Perhaps that’s the problem?

#3

Thanks for the feedback. I’m trying to reference the parcer class that is at the top of the playground from a function towards the bottom. Is that what you mean? Where should I declare the parcer class?

#4

I figured it out. I had it declared within the Lexer class. I just copied and pasted the code outside of the brackets, above the evaluate function.