diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-07-15 15:10:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-15 15:10:50 +0200 |
| commit | 5dcf2252629655d45ea4e3169f003b4010665fd6 (patch) | |
| tree | 9244232317b9568a4b4ab3f0f0a14d60b484b90e /src/server/analysis.odin | |
| parent | 71f577c7b22db5e74f38b23dbc171a7c4de8113c (diff) | |
| parent | d2a6b208bf6a9d62400b9134f557658ea4ad9b83 (diff) | |
Merge pull request #749 from BradLewis/fix/proc-implicit-selector
Correctly resolve proc param type
Diffstat (limited to 'src/server/analysis.odin')
| -rw-r--r-- | src/server/analysis.odin | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 170bf37..0c3178a 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -659,6 +659,21 @@ get_procedure_arg_count :: proc(v: SymbolProcedureValue) -> int { return total } +// Gets the call argument type at the specified index +get_proc_call_argument_type :: proc(value: SymbolProcedureValue, parameter_index: int) -> (^ast.Field, bool) { + index := 0 + for arg in value.arg_types { + for name in arg.names { + if index == parameter_index { + return arg, true + } + index += 1 + } + } + + return nil, false +} + /* Figure out which function the call expression is using out of the list from proc group */ |