moonsharp icon indicating copy to clipboard operation
moonsharp copied to clipboard

Compound assignment operators (e.g. "+=")

Open Joy-less opened this issue 2 years ago • 0 comments

Adds support for: +=, -=, *=, /=, %=, ^=, and ..=.

While these operators are not present in Lua, they are present in Luau and save a lot of time.

Example:

local a = 0
a += 5
print(a)

Converts to:

local a = 0
a = a + 5
print(a)

Joy-less avatar Aug 10 '23 21:08 Joy-less