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

Support Lua 5.3 syntax #534

Closed
ayyar opened this issue Aug 15, 2022 · 1 comment · Fixed by #576
Closed

Support Lua 5.3 syntax #534

ayyar opened this issue Aug 15, 2022 · 1 comment · Fixed by #576
Labels
enhancement New feature or request external This issue relies on an external factor

Comments

@ayyar
Copy link

ayyar commented Aug 15, 2022

Could not format file: error: failed to format from stdin: error parsing: error occurred while tokenizing: unexpected character ~ at line 7, column 35
--!strict

-- A function that computes the bitwise XOR of an array of numbers
function bitwise_xor_array(array)
    local bitwise_xor = 0
    for i = 1, #array do
        bitwise_xor = bitwise_xor ~ array[i]
    end
    return bitwise_xor
end
@JohnnyMorganz
Copy link
Owner

This requires support in full-moon which is the parser we use. I think this is Lua 5.3 syntax? Currently only up to 5.2 is supported.

Once full moon has 5.3+ support, this should be supported in stylua.

@JohnnyMorganz JohnnyMorganz added enhancement New feature or request external This issue relies on an external factor labels Aug 16, 2022
@JohnnyMorganz JohnnyMorganz changed the title Tokenization error with bitwise Xor operator Support Lua 5.3 syntax Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external This issue relies on an external factor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants