LocalVal
This is always a const local and importantly the inst is a value type, not a pointer.
This structure lives as long as the AST generation of the Block
node that contains the variable.
Fields of this type
Fields
- parent:*Scope
- Parents can be: `LocalVal`, `LocalPtr`, `GenZir`, `Defer`, `Namespace`.
- gen_zir:*GenZir
- inst:Zir.Inst.Ref
- token_src:Ast.TokenIndex
- Source location of the corresponding variable declaration.
- used:Ast.OptionalTokenIndex
- Track the first identifier where it is referenced.
- discarded:Ast.OptionalTokenIndex
- Track the identifier where it is discarded, like this `_ = foo;`.
- is_used_or_discarded:?*bool
- = null
- name:Zir.NullTerminatedString
- String table index.