2,875
edits
(Add ConcatEnumerator) |
No edit summary |
||
Line 12: | Line 12: | ||
-- BASE ENUMERATOR CLASS -- | -- BASE ENUMERATOR CLASS -- | ||
local Enumerator = {} | local Enumerator = {} | ||
local Enumerator_mt = { | local Enumerator_mt = { | ||
Line 40: | Line 39: | ||
function Enumerator:overridePairs(startIndex) | function Enumerator:overridePairs(startIndex) | ||
-- Get or create clean enumerator. This ensures the state is 0. | -- Get or create clean enumerator. This ensures the state is 0. | ||
local enum = self:getEnumerator( | local enum = self:getEnumerator(startIndex == 0) | ||
enum.current = nil | enum.current = nil | ||
enum.index = startIndex | enum.index = startIndex |
edits