diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-03 11:36:59 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-07-03 11:37:50 -0400 |
| commit | 88e32ed20996dc59815af4f62a4a10c212d608ea (patch) | |
| tree | 231872d0028bf923047a7870409fc5e18aac4f0d /src | |
| parent | 15c2a3e5cf38fd6274099baffc521022f319dd60 (diff) | |
Store local variables when looping over bitsets
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 9f7018f..7170935 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -3550,6 +3550,39 @@ get_locals_for_range_stmt :: proc( ) } } + case SymbolBitSetValue: + if len(stmt.vals) >= 1 { + if ident, ok := unwrap_ident(stmt.vals[0]); ok { + store_local( + ast_context, + ident, + v.expr, + ident.pos.offset, + ident.name, + ast_context.non_mutable_only, + false, + true, + symbol.pkg, + false, + ) + } + } + if len(stmt.vals) >= 2 { + if ident, ok := unwrap_ident(stmt.vals[1]); ok { + store_local( + ast_context, + ident, + make_int_ast(ast_context, ident.pos, ident.end), + ident.pos.offset, + ident.name, + ast_context.non_mutable_only, + false, + true, + symbol.pkg, + false, + ) + } + } } } |