aboutsummaryrefslogtreecommitdiff
path: root/src/server/symbol.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-03 18:37:02 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-03 19:48:16 -0400
commit85d65fcfb761b49df6c03e1ed8e0523556c0bb62 (patch)
treef138f5d18a755502debfa44535d307f15fa3e23b /src/server/symbol.odin
parent2edc388c40b4431cdfdc3d915fe9a139768aa783 (diff)
Add enum base type and values to the enum symbol and update hover to include that information
Diffstat (limited to 'src/server/symbol.odin')
-rw-r--r--src/server/symbol.odin11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index 2d99d22..fddc775 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -67,8 +67,10 @@ SymbolAggregateValue :: struct {
}
SymbolEnumValue :: struct {
- names: []string,
- ranges: []common.Range,
+ names: []string,
+ values: []^ast.Expr,
+ base_type: ^ast.Expr,
+ ranges: []common.Range,
}
SymbolUnionValue :: struct {
@@ -345,7 +347,10 @@ write_struct_type :: proc(
}
write_symbol_struct_value :: proc(
- ast_context: ^AstContext, b: ^SymbolStructValueBuilder, v: SymbolStructValue, base_using_index: int
+ ast_context: ^AstContext,
+ b: ^SymbolStructValueBuilder,
+ v: SymbolStructValue,
+ base_using_index: int,
) {
base_index := len(b.names)
for name in v.names {