Skip to content

assignment in line decorators #375

@ghost

Description

Would it be possible to add conditional assignment to line decorators? For example, I can do option 1:
fcolor=message\match "<%w*>"
message=message\gsub "<%->", fcolor if fcolor

Or option 2:
message=message\gsub "<%->", fcolor if (->fcolor=message\match "<%w*>" )!

But option 2 creates an anonymous function. The following would be better:

message=message\gsub "<%->", fcolor if fcolor=message\match "<%w*>"
compiled to the same output as
if fcolor=message\match "<%w*>" then message=message\gsub "<%->", fcolor

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