Skip to content

parser apparently aliases the state argument to internal functions #3629

@gwhitney

Description

@gwhitney

OK, inserted return parseSymbol(state) at the point where not is detected. Note that it's necessary to restore state to what it was before grabbing the ( token; you can't just return parseSymbol(saveState). In other words, the state object that comes into parseUnary must be aliased somewhere, so that if it doesn't agree with the state passed into parseSymbol then the parse is spoiled. Should I file an issue about that, or just not worry about it since the parser is working as long as you properly update the input state object in every parseXxx() function? (I'm inclined toward the latter.)

Originally posted by @gwhitney in #3611 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions