py-lua-parser icon indicating copy to clipboard operation
py-lua-parser copied to clipboard

is ULengthOP Operator precedence Incorrected?

Open ctemple opened this issue 1 year ago • 0 comments

-- 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: {...}
}

ctemple avatar Mar 28 '23 03:03 ctemple