Skip to content

Cannot parse "^" expression, when a negative number is on the right side #5

@toxamin

Description

@toxamin

Currently, due to this line:

and OPERATOR_PRECEDENCE.unary > lastPrecedence

the following code fails to parse correctly:
local _ = 6 ^ -4

Proposed solution: Change the line to include a check for "^" (not sure if this breaks anything)
and ((OPERATOR_PRECEDENCE.unary > lastPrecedence) or lastPrecedence == 11)

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