LocalPtr
This could be a const or var local. It has a pointer instead of a value.
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
- ptr: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;`.
- used_as_lvalue:bool
- Whether this value is used as an lvalue after initialization.
- name:Zir.NullTerminatedString
- String table index.
- maybe_comptime:bool
- true means we find out during Sema whether the value is comptime.