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

Function call without indentation #273

Closed
edemaine opened this issue Jan 22, 2023 · 2 comments · Fixed by #277
Closed

Function call without indentation #273

edemaine opened this issue Jan 22, 2023 · 2 comments · Fixed by #277
Labels
bug Something isn't working

Comments

@edemaine
Copy link
Collaborator

The following examples currently end up calling x as a function, despite the lack of indentation:

x
y: z
x
{y: z}
x
{y: z} = obj
@STRd6
Copy link
Contributor

STRd6 commented Jan 22, 2023

Also:

x
[y]

@edemaine
Copy link
Collaborator Author

edemaine commented Jan 23, 2023

Ha, this bug is actually #272 in disguise. The raw output of Civet is actually what we thought it should be:

Civet 0.5.51 REPL.  Enter a blank line to transpile code.
🐈> x
... y: z
...
x
({y: z})
🐈> x
... {y: z}
...
x
({y: z})
🐈> x
... [y]
...
x
[y]
🐈>

The issue is that the Playground runs Prettier, and because this code doesn't trigger automatic semicolon insertion, it gets combined into a function call / property access. So #277 fixes this issue too.

@edemaine edemaine linked a pull request Jan 23, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants