aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 6c615e6..30ae974 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -767,6 +767,8 @@ resolve_type_identifier :: proc(ast_context: ^AstContext, node: ast.Ident) -> (i
return make_symbol_array_from_ast(ast_context, v), true;
case Dynamic_Array_Type:
return make_symbol_dynamic_array_from_ast(ast_context, v), true;
+ case Map_Type:
+ return make_symbol_map_from_ast(ast_context, v), true;
case Call_Expr:
return resolve_type_expression(ast_context, local);
case:
@@ -1216,6 +1218,21 @@ make_symbol_dynamic_array_from_ast :: proc(ast_context: ^AstContext, v: ast.Dyna
return symbol;
}
+make_symbol_map_from_ast :: proc(ast_context: ^AstContext, v: ast.Map_Type) -> index.Symbol {
+
+ symbol := index.Symbol {
+ range = common.get_token_range(v.node, ast_context.file.src),
+ pkg = get_package_from_node(v.node),
+ };
+
+ symbol.value = index.SymbolMapValue {
+ key = v.key,
+ value = v.value,
+ };
+
+ return symbol;
+}
+
make_symbol_basic_type_from_ast :: proc(ast_context: ^AstContext, n: ^ast.Node, v: ^ast.Ident) -> index.Symbol {
symbol := index.Symbol {