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

Formation with comment between colon and method - breaks AST #890

Closed
d-enk opened this issue Sep 11, 2024 · 0 comments · Fixed by #904
Closed

Formation with comment between colon and method - breaks AST #890

d-enk opened this issue Sep 11, 2024 · 0 comments · Fixed by #904
Labels
bug Something isn't working

Comments

@d-enk
Copy link

d-enk commented Sep 11, 2024

before:

build(): -- comment
init():start()

after:

build()(): -- commentinit():start()

--verify

error: could not format file ./stylua.lua: INTERNAL ERROR: Output AST generated a syntax error. Please report this at https://github.com/johnnymorganz/stylua/issues
error occurred while creating ast: unexpected token ``. (starting from line 8, character 1 and ending on line 8, character 1)
additional information: expected method

With . instead : - OK

build(). -- comment
init():start()
build()
	-- comment
	.init()
	:start()

Looks like related #873

@d-enk d-enk changed the title Formation with comment between colon and method breaks AST Formation with comment between colon and method - breaks AST Sep 11, 2024
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Oct 26, 2024
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