Add custom operators (Part 2)

This commit is contained in:
Jean-Patrick Guerrero
2021-11-29 02:47:36 +01:00
parent 34548d8509
commit eaf7c486b8
5 changed files with 21 additions and 16 deletions

View File

@ -1,24 +1,22 @@
local a, b, c = 0, 0, 0
b+=1
c++; local foo = "bar";
print(c-=1)
print(c++)
local t = {
a = a++,
b = b++,
c = c++,
b = 2,
c = c+=2,
d = a&3,
e = 1,
}
t["b"] <<= 4
print(dump(t))
--c += 1
c*=2
local i = 16
i += i<<4
print(i) -- 272
print(a+=2) -- 2
print(c++) -- 3
print(a-=1) -- -1