Thomas Jericke |
|
This page is used to distribute patches that I made in my private time. They should be tested by anyone who is applying them as I never tested any of them on productive Lua code.
It is important to consider that this patches are more for fun (yet).
Currently there is one patch available:
In the current version of the patch, brackets the following brackets can be left away. Method call without any arguments:
object:method -- equals object:method()
Method invocation on any literal (string, number, true, false, nil)
"Hello":upper -- equals ("Hello"):upper() 43:tostring -- equals (43):tostring()Obviously this change is only practical once a meaningful metatable was set for string, number etc.
Operators on tables (except call operator)
a = { a = 12 }.a b = { 1 = 14, 12 = "t" }[a]
The patch should be backward compatible for existing Lua 5.2 scripts. This was tested with the Lua test suite where it passed all test with exception of some which tested an error output.