# AstGen: finish multi-object for loops · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/841add6890d001d315591dc20f7d464c264d88bb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 841add6890d001d315591dc20f7d464c264d88bb

Requested commit: 841add6890d001d315591dc20f7d464c264d88bb

Commit: 841add6890d001d315591dc20f7d464c264d88bb

Tree: b2680e04e8e16c1ff52a317830c51398cc79c0bf

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
AstGen: finish multi-object for loops

This strategy uses pointer arithmetic to iterate through the loop. This
has a problem, however, which is tuples. AstGen does not know whether a
given indexable is a tuple or can be iterated based on contiguous
memory. Tuples unlike other indexables cannot be represented as a
many-item pointer that is incremented as the loop counter.

So, after this commit, I will modify AstGen back closer to how @vexu had
it before, using a counter and array element access.

```

## Parents

- [faa44e2e5875036b105d8b7d38ccb2e93757a3c5](https://git.cafe/gitcafe/zig/commit/faa44e2e5875036b105d8b7d38ccb2e93757a3c5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/841add6890d001d315591dc20f7d464c264d88bb?format=markdown)
