Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

@d-enk

Description

@d-enk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions