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

NoOp can only be followed by ; (not ,) #12

Open
kymckay opened this issue May 1, 2021 · 2 comments
Open

NoOp can only be followed by ; (not ,) #12

kymckay opened this issue May 1, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@kymckay
Copy link
Owner

kymckay commented May 1, 2021

Having multiple semicolons in a row is valid syntax (a bunch of no operations), but multiple commas produces an error. However commas can still be at the end of statements.

The implementation currently doesn't reflect this behaviour.

@kymckay kymckay added the bug Something isn't working label May 1, 2021
@kymckay
Copy link
Owner Author

kymckay commented May 4, 2021

This is something of a strangely specific syntax error since it makes the grammar more complicated (statements with comma delimiters are different to statements with semi-colon delimiters). Will probably just have to hardcode in the edge case.

@kymckay
Copy link
Owner Author

kymckay commented May 14, 2021

This might actually be a reflection of SQFs grammar only allowing commas to seperate expressions and not statements (NoOp being a type of statement, but not a type of expression). It would make sense with array displays in mind, but need to test if something like 1,; is valid (the expression within the statement consuming the comma).

@kymckay kymckay added this to the 1.0.0 milestone Jul 18, 2021
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

1 participant