Skip to content

is ULengthOP Operator precedence Incorrected? #38

@ctemple

Description

@ctemple

-- test.lua
local table3 = {}
table3[#table3 + 1] = 100

run
luaparser ./test.lua

output

{
    ...
    "ULengthOp": {
        "operand": {
            "AddOp": {
                "left": {
                    "Name": {
                        "id": "table3",
                        "start_char": 26,
                        "stop_char": 31,
                        "line": 2
                    }
                },
                "right": {
                    "Number": {
                        "n": 1,
                        "start_char": 35,
                        "stop_char": 35,
                        "line": 2
                    }
                },
            }
        }
    }
   ...
}

expected:

AddOp
{
    left: ULengthOp {}
    right: {...}
}

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