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

Obfuscated code blocks and table after '||' operator #47

Closed
progmboy opened this issue Nov 9, 2022 · 2 comments
Closed

Obfuscated code blocks and table after '||' operator #47

progmboy opened this issue Nov 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@progmboy
Copy link
Contributor

progmboy commented Nov 9, 2022

testcase:

clue code:

local a = nil
local b = a || {"123"}
print(b[1])

expected result:

local a = nil
local b = a or {"123"}
print(b[1])

clue v2.5.1 with run error:
Error in file "test.clue" at line 3!
Error: "Operator '||' has invalid right hand token"

Of course this error can be easily avoided:

local a = nil
local c = {"123"}
local b = a || c
print(b[1])

I'm not sure if the syntax of clue doesn't support || followed with table {}

@Maiori44
Copy link
Member

Maiori44 commented Nov 9, 2022

local b = a || ({...}) might work too

@Maiori44 Maiori44 added the bug Something isn't working label Nov 9, 2022
@Maiori44
Copy link
Member

Maiori44 commented Nov 9, 2022

local b = a || {...} is now valid syntax in Clue 2.5.2, so this issue is resolved

@Maiori44 Maiori44 closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants