2,875
edits
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
function Enumerator:moveNext() | function Enumerator:moveNext() | ||
error('Not implemented in base class.') | error('Not implemented in base class.') | ||
end | end | ||
Line 22: | Line 21: | ||
-- Hooks the moveNext function into the Lua 'pairs' function | -- Hooks the moveNext function into the Lua 'pairs' function | ||
function Enumerator:overridePairs() | function Enumerator:overridePairs() | ||
self.index = nil | self.index = nil | ||
self.current = nil | self.current = nil | ||
Line 49: | Line 47: | ||
function TableEnumerator:moveNext() | function TableEnumerator:moveNext() | ||
-- Grab the next index for the internal table. | -- Grab the next index for the internal table. | ||
local key = self.index | local key = self.index |
edits