Skip to content

The @ and @@ accessors do not escape Lua keywords. #384

Closed
@daelvn

Description

@daelvn

MoonScript supports syntax such as t.for and gets translated to t["for"], it happens in table construction and other places as well. This however, isn't the case for indexes such as @for or @@function, which get translated into self.for and self.__class.function respectively, without escaping them.
The expected result is self["for"] and self.__class["function"].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions