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?
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?
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?
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.