minor improvements, typos, etc.
This commit is contained in:
@@ -14,19 +14,20 @@ will replace all instances of named indexes with a unique number constant.
|
||||
## Valid Usage
|
||||
|
||||
```lua
|
||||
local foo = MV_INDEX_TO_NUM({total = 0})
|
||||
local foo = MV_INDEX_TO_NUM({total = 0, b = 2})
|
||||
for i = 1, 10 do
|
||||
foo.total = foo.total + i
|
||||
end
|
||||
return foo.total
|
||||
return foo.total + foo.b
|
||||
```
|
||||
|
||||
turns into:
|
||||
|
||||
```lua
|
||||
local a={[19314]=0}
|
||||
-- note that the order of the indexes has been changed as well
|
||||
local a={[24453]=2,[19314]=0}
|
||||
for b=1,10 do
|
||||
a[19314]=a[19314]+b
|
||||
end
|
||||
return a[19314]
|
||||
return a[19314] + a[24453]
|
||||
```
|
Reference in New Issue
Block a user