Page 3 of 3
Re: Objective Lua - additional syntax to original Lua!
Posted: Mon Feb 08, 2021 11:33 pm
by zorg
more than that, since lua supports multiple assignment, would multiple compound assignment be supported?
a,b*=b+5,1-a
->
a,b = a*(b+5),b*(1-a)
Re: Objective Lua - additional syntax to original Lua!
Posted: Thu Feb 11, 2021 7:19 pm
by lauriszz123
Objective Lua Version 2.4 Released
As per pgimeno's claim I've added support for:
Code: Select all
local i = 0
i += expression
i -= expression
i *= expression
i /= expression
i ^= expression
i %= expression
As well as zorg's claim:
Code: Select all
a, b, c *= expression, expression, expression
Which all of these expressions evaluate to:
Code: Select all
i = i + ( expression )
i = i - ( expression )
i = i * ( expression )
i = i / ( expression )
i = i ^ ( expression )
i = i % ( expression )
a, b, c = a * ( expression ), b * ( expression ), c * ( expression )
Re: Objective Lua - additional syntax to original Lua!
Posted: Sat Feb 13, 2021 7:58 pm
by 4vZEROv
Some stuff that doesn't work:
Code: Select all
self.x += .5
self.x += (function return 5 end)()
Re: Objective Lua - additional syntax to original Lua!
Posted: Sat Feb 13, 2021 9:31 pm
by lauriszz123
Objective Lua Version 2.5 Released
Fixed bugs that 4vZEROv addressed. Thanks!
The new version is in the GitHub repo
here!
Re: Objective Lua - additional syntax to original Lua!
Posted: Sun Feb 14, 2021 4:35 am
by 4vZEROv
Don't work either
Code: Select all
local y = {[1] = 5, w = 10}
y[1] += 5
y['w'] += 10
y["w"] += 10
Re: Objective Lua - additional syntax to original Lua!
Posted: Sun Feb 14, 2021 9:15 am
by lauriszz123
Objective Lua Version 2.6 Released
Fixed bugs that 4vZEROv addressed. Thanks again 4vZEROv!
All in all
2.6 I think is the release that should improve stability with math operations. If any bugs spotted, feel free to give me an example of it and I will quickly iron it out!
The new version is in the GitHub repo
here!
Regards,
Laurynas.
Re: Objective Lua - additional syntax to original Lua!
Posted: Sun Feb 14, 2021 9:24 am
by grump
Code: Select all
a += nil or 1
a += a > 0 and 1 or 2
a += -b
a += --[[ test ]] 1
a, b += (function() return 1, 2 end)()