We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When writing table literals, the colon ':' must be just next (glued) to the identifier.
The following will generate a parse error
table = { id : @id, handler: @handler }
But the following will works just fine
-- Not aligned table = { id: @id, handler: @handler } -- Aligned table = { id: @id, handler: @handler }
P.S. The error happens with any type of table literals' syntaxes
-- Fails table = id : @id, handler: @handler -- Pass table = id: @id, handler: @handler --- -- Fails table = id : @id, handler: @handler -- Pass table = id: @id, handler: @handler --- -- Fails values = { 1,2,3,4 5,6,7,8 name : "superman" occupation: "crime fighting" } -- Pass values = { 1,2,3,4 5,6,7,8 name: "superman" occupation: "crime fighting" }
P.S. 2: Destructuring also has this error
The text was updated successfully, but these errors were encountered:
This is an intentional syntax choice to avoid ambiguity:
hello: world
{hello = world}
hello :world
hello({world = world})
hello : world
Sorry I did not reply to this issue sooner
Sorry, something went wrong.
Oh, I see. I'm closing the issue, thank you for your time.
No branches or pull requests
When writing table literals, the colon ':' must be just next (glued) to the identifier.
The following will generate a parse error
But the following will works just fine
P.S. The error happens with any type of table literals' syntaxes
P.S. 2: Destructuring also has this error
The text was updated successfully, but these errors were encountered: