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

Parsing fails when a type declaration includes a goto key. #703

Closed
GabeMillikan opened this issue May 16, 2023 · 1 comment
Closed

Parsing fails when a type declaration includes a goto key. #703

GabeMillikan opened this issue May 16, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@GabeMillikan
Copy link

The following code:

type Test = {
    goto: string;
}

Fails to be formatted with the following error:
Could not format file: error: could not format from stdin: failed to format from stdin: error parsing: error occurred while creating ast: unexpected token `goto`. (starting from line 2, character 5 and ending on line 2, character 9) additional information: expected `}` to match `{`

This is easily resolved by naming the field go_to instead (although not desirable). The code is perfectly valid syntax and works fine in the Roblox IDE.

I'm using the version currently available on VSCode marketplace.

@JohnnyMorganz
Copy link
Owner

This is the same problem as #407

Right now, you need to build / install via cargo to workaround this issue unfortunately.

Hopefully it should be fixed sometime soon, as our parser is undergoing a rewrite

@JohnnyMorganz JohnnyMorganz added the duplicate This issue or pull request already exists label May 16, 2023
@JohnnyMorganz JohnnyMorganz closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants