Repository navigation
Commit dc0f8ae
committed
fix(elixir): populate first_string_arg for Elixir calls
tree-sitter-elixir attaches no field name to a call's arguments node. Its whole
field set is key, left, operand, operator, quoted_start, quoted_end, right,
target and value, so ts_node_child_by_field_name(node, "arguments") is always
null for Elixir and call.first_string_arg was never populated for any Elixir
call.
Every downstream signal that keys off a call's string argument was therefore
dead for Elixir: Phoenix route paths, HTTP/async service URLs, and config keys.
Nothing reported an error — the field was simply always NULL.
The definition side already knows this: extract_defs.c carries
elixir_call_args() with a positional second-child fallback for exactly this
reason. This adds the same fallback on the call side, gated to `call` nodes,
since Elixir's other call kinds (`dot`, the `|>` binary_operator) carry no
arguments node in that position.
The new test pins the field directly rather than a downstream effect.
Signed-off-by: Henry Hazan <henry@teramine.io>1 parent 46ae198 commit dc0f8ae
2 files changed
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
518 | 529 | | |
519 | 530 | | |
520 | 531 | | |
| |||
3311 | 3322 | | |
3312 | 3323 | | |
3313 | 3324 | | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
3314 | 3340 | | |
3315 | 3341 | | |
3316 | 3342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1008 | 1035 | | |
1009 | 1036 | | |
1010 | 1037 | | |
| |||
5432 | 5459 | | |
5433 | 5460 | | |
5434 | 5461 | | |
| 5462 | + | |
5435 | 5463 | | |
5436 | 5464 | | |
5437 | 5465 | | |
| |||
0 commit comments