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

XS appears to incorrectly ignore comma at end-of-line #899

Closed
gibson042 opened this issue Apr 12, 2022 · 2 comments
Closed

XS appears to incorrectly ignore comma at end-of-line #899

gibson042 opened this issue Apr 12, 2022 · 2 comments
Labels
confirmed issue reported has been reproduced fixed - please verify Issue has been fixed. Please verify and close.

Comments

@gibson042
Copy link

Environment: XS 11.6.0 32 4

Description
XS appears to incorrectly allow automatic semicolon insertion to terminate a statement that includes a comma before a LineTerminator.

Steps to Reproduce
Execute the following syntactically incorrect code:

const a = 0,
const b = 1;
print(a, b);

Expected behavior
No code is evaluated and a syntax error is reported.

Actual behavior
a and b bindings are created and the print reports corresponding values.

0 1
@phoddie
Copy link
Collaborator

phoddie commented May 31, 2022

FYI – XS also accepts this line, so the issue isn't related to automatic semicolon insertion.

const a = 0, ; const b = 1;

This is expected to be fixed in XS13.

@phoddie phoddie added the confirmed issue reported has been reproduced label May 31, 2022
mkellner pushed a commit that referenced this issue Jun 6, 2022
@phoddie
Copy link
Collaborator

phoddie commented Jun 6, 2022

Fixing this broke our build because ssl_handshake.js used commas at the end of a few lines where it should have used semicolons. That's fixed now too.

@phoddie phoddie added the fixed - please verify Issue has been fixed. Please verify and close. label Jun 6, 2022
@phoddie phoddie closed this as completed Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed issue reported has been reproduced fixed - please verify Issue has been fixed. Please verify and close.
Projects
None yet
Development

No branches or pull requests

2 participants