# Re-factor: Change AstGen.ResultLoc to be a struct · gitcafe/zig

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

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

Visibility: public

Requested revision: 77720e30aaead1c814f2714bd5a7ad7ad0fbc23e

Requested commit: 77720e30aaead1c814f2714bd5a7ad7ad0fbc23e

Commit: 77720e30aaead1c814f2714bd5a7ad7ad0fbc23e

Tree: 70ab61b6e3a86770290565d4efe132d6ec31b67f

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
Re-factor: Change AstGen.ResultLoc to be a struct

This re-factor is intended to make it easier to track what kind of
operator/expression consumes a result location, without overloading the
ResultLoc union for this purpose.

This is used in the following commit to keep track of initializer
expressions of `const` variables to avoid popping error traces
pre-maturely. Hopefully this will also be useful for implementing
RLS temporaries in the future.

```

## Parents

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

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