Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is ULengthOP Operator precedence Incorrected? #38

Open
ctemple opened this issue Mar 28, 2023 · 0 comments
Open

is ULengthOP Operator precedence Incorrected? #38

ctemple opened this issue Mar 28, 2023 · 0 comments

Comments

@ctemple
Copy link

ctemple commented Mar 28, 2023

-- 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 ctemple changed the title is ULengthOP Operator priority Incorrected? is ULengthOP Operator precedence Incorrected? Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant