diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-26 19:35:29 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-26 19:35:29 +1100 |
| commit | 64d2031c8ddcb31698599cd744a183f8415413f6 (patch) | |
| tree | 6e9fefcb4ec90db4714dcdc37aeda0ec69eb3a6e /src/server/symbol.odin | |
| parent | 5872154f56d21074f0e77950612bc769351094aa (diff) | |
Add vector completions for using struct fields
Diffstat (limited to 'src/server/symbol.odin')
| -rw-r--r-- | src/server/symbol.odin | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin index a5b8690..956eaa9 100644 --- a/src/server/symbol.odin +++ b/src/server/symbol.odin @@ -412,10 +412,8 @@ write_struct_type :: proc( } } } - s := Symbol{ - - } + s: Symbol if _, ok := get_attribute_objc_class_name(attributes); ok { b.symbol.flags |= {.ObjC} if get_attribute_objc_is_class_method(attributes) { @@ -629,6 +627,15 @@ expand_objc :: proc(ast_context: ^AstContext, b: ^SymbolStructValueBuilder) { } } +is_struct_field_using :: proc(v: SymbolStructValue, index: int) -> bool { + for i in v.usings { + if i == index { + return true + } + } + return false +} + get_proc_arg_count :: proc(v: SymbolProcedureValue) -> int { total := 0 for proc_arg in v.arg_types { |