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)
Objective Lua - additional syntax to original Lua!
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Objective Lua - additional syntax to original Lua!
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Prole
- Posts: 11
- Joined: Thu Oct 04, 2018 1:01 pm
Re: Objective Lua - additional syntax to original Lua!
Objective Lua Version 2.4 Released
As per pgimeno's claim I've added support for:
As well as zorg's claim:
Which all of these expressions evaluate to:
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
Code: Select all
a, b, c *= expression, expression, expression
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!
Some stuff that doesn't work:
Code: Select all
self.x += .5
self.x += (function return 5 end)()
-
- Prole
- Posts: 11
- Joined: Thu Oct 04, 2018 1:01 pm
Re: Objective Lua - additional syntax to original Lua!
Objective Lua Version 2.5 Released
Fixed bugs that 4vZEROv addressed. Thanks!
The new version is in the GitHub repo here!
Fixed bugs that 4vZEROv addressed. Thanks!
The new version is in the GitHub repo here!
Re: Objective Lua - additional syntax to original Lua!
Don't work either
Code: Select all
local y = {[1] = 5, w = 10}
y[1] += 5
y['w'] += 10
y["w"] += 10
-
- Prole
- Posts: 11
- Joined: Thu Oct 04, 2018 1:01 pm
Re: Objective Lua - additional syntax to original Lua!
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.
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!
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)()
Who is online
Users browsing this forum: No registered users and 4 guests