summaryrefslogtreecommitdiff
path: root/src/server/locals.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/locals.odin')
-rw-r--r--src/server/locals.odin33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/server/locals.odin b/src/server/locals.odin
index 4a542bf..272504d 100644
--- a/src/server/locals.odin
+++ b/src/server/locals.odin
@@ -914,6 +914,39 @@ get_locals_for_range_stmt :: proc(
)
}
}
+ case SymbolEnumValue:
+ if len(stmt.vals) >= 1 {
+ if ident, ok := unwrap_ident(stmt.vals[0]); ok {
+ store_local(
+ ast_context,
+ ident,
+ stmt.expr,
+ ident.pos.offset,
+ ident.name,
+ ast_context.non_mutable_only,
+ false,
+ {.Mutable},
+ 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,
+ {.Mutable},
+ symbol.pkg,
+ false,
+ )
+ }
+ }
}
}