diff options
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/analysis.odin | 4 | ||||
| -rw-r--r-- | src/server/file_resolve.odin | 4 | ||||
| -rw-r--r-- | src/server/references.odin | 10 | ||||
| -rw-r--r-- | src/server/symbol.odin | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index acd5733..7b4d125 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -4797,14 +4797,14 @@ get_document_position_node :: proc( case ^Ellipsis: get_document_position(n.expr, position_context) case ^Proc_Lit: - get_document_position(n.type, position_context) - if position_in_node(n.body, position_context.position) { + get_document_position(n.type, position_context) position_context.function = cast(^Proc_Lit)node append(&position_context.functions, position_context.function) get_document_position(n.body, position_context) } else if position_in_node(n.type, position_context.position) { position_context.function = cast(^Proc_Lit)node + get_document_position(n.type, position_context) } case ^Comp_Lit: //only set this for the parent comp literal, since we will need to walk through it to infer types. diff --git a/src/server/file_resolve.odin b/src/server/file_resolve.odin index d6119c5..3c1ed17 100644 --- a/src/server/file_resolve.odin +++ b/src/server/file_resolve.odin @@ -142,7 +142,6 @@ resolve_node :: proc(node: ^ast.Node, data: ^FileResolveData) { case ^Bad_Expr: case ^Ident: data.position_context.identifier = node - if data.flag != .None { if symbol, ok := resolve_location_identifier(data.ast_context, n^); ok { @@ -421,10 +420,9 @@ resolve_node :: proc(node: ^ast.Node, data: ^FileResolveData) { }, } } - } else { - resolve_nodes(n.names, data) } + resolve_nodes(n.names, data) resolve_node(n.type, data) resolve_node(n.default_value, data) case ^Field_List: diff --git a/src/server/references.odin b/src/server/references.odin index a23d968..f82a80e 100644 --- a/src/server/references.odin +++ b/src/server/references.odin @@ -36,9 +36,15 @@ walk_directories :: proc( } if strings.contains(info.name, ".odin") { - slash_path, _ := filepath.to_slash(info.fullpath) + slash_path, _ := filepath.to_slash( + info.fullpath, + context.temp_allocator, + ) if slash_path != document.fullpath { - append(&fullpaths, strings.clone(info.fullpath)) + append( + &fullpaths, + strings.clone(info.fullpath, context.temp_allocator), + ) } } diff --git a/src/server/symbol.odin b/src/server/symbol.odin index 2e9aa27..9e0f154 100644 --- a/src/server/symbol.odin +++ b/src/server/symbol.odin @@ -215,6 +215,7 @@ free_symbol :: proc(symbol: Symbol, allocator: mem.Allocator) { common.free_ast(v.arg_types, allocator) case SymbolStructValue: delete(v.names, allocator) + delete(v.ranges, allocator) common.free_ast(v.types, allocator) case SymbolGenericValue: common.free_ast(v.expr, allocator) @@ -248,6 +249,7 @@ free_symbol :: proc(symbol: Symbol, allocator: mem.Allocator) { case SymbolPackageValue: case SymbolBitFieldValue: delete(v.names, allocator) + delete(v.ranges, allocator) common.free_ast(v.types, allocator) } } |