rajatnagda45
f893a6e2da
fix(swift): extract macro declarations and resolve freestanding macro calls
...
Swift 5.9 macros were dropped entirely. `macro stringify(...) = #externalMacro(...)`
parses as a `macro_declaration` (freestanding or attached), which was in neither
`function_types` nor `class_types`, so the symbol never entered the graph. A
freestanding call `#stringify(...)` parses as a `macro_invocation`, not a
`call_expression`, so its call edge was lost too.
- Add `macro_declaration` to the Swift `function_types`. It has no `name` field,
but the name is a bare `simple_identifier` child already covered by
`name_fallback_child_types`, so the existing name resolution handles it; the
generic `<T>` type parameter is excluded by the existing type-param scope pass
(no `t` god node).
- Add `macro_invocation` to `call_types` and give it a callee branch in
walk_calls: a freestanding macro is a free top-level symbol (resolved by bare
name, no `self` receiver). Calls inside the macro's arguments
(`#stringify(helper())`) still resolve because walk_calls recurses into the
invocation's children.
Attached-macro *usage* (`@AddCompletion` on a type) is an attribute, not a
`macro_invocation`, so it is not linked to the macro — left unresolved
(fail-closed); the declaration itself is still extracted.
2026-10-20 10:35:25 +01:00
..
2026-10-13 10:27:02 +01:00
2026-10-10 22:13:39 +01:00
2026-10-11 20:47:55 +01:00
2026-10-20 10:35:23 +01:00
2026-10-08 14:27:06 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 12:16:17 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 14:49:28 +01:00
2026-10-16 18:25:28 +01:00
2026-10-12 23:02:50 +01:00
2026-10-07 17:26:00 +01:00
2026-10-13 22:21:43 +01:00
2026-10-12 14:49:28 +01:00
2026-10-16 18:25:28 +01:00
2026-10-09 02:48:22 +01:00
2026-10-08 14:27:06 +01:00
2026-10-16 17:14:07 +01:00
2026-10-11 21:07:15 +01:00
2026-10-06 20:54:55 +01:00
2026-10-13 11:14:16 +01:00
2026-10-13 11:18:12 +01:00
2026-10-20 10:35:24 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 11:14:16 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:48 +01:00
2026-10-13 22:21:43 +01:00
2026-10-12 14:50:32 +01:00
2026-10-13 22:21:48 +01:00
2026-10-12 13:01:00 +01:00
2026-10-12 22:37:55 +01:00
2026-10-12 12:29:39 +01:00
2026-10-16 18:21:28 +01:00
2026-10-13 22:21:43 +01:00
2026-10-16 17:10:31 +01:00
2026-10-12 22:58:40 +01:00
2026-10-10 21:20:29 +01:00
2026-10-08 14:28:54 +01:00
2026-10-08 14:28:27 +01:00
2026-10-07 17:26:00 +01:00
2026-10-11 20:49:42 +01:00
2026-10-11 20:49:42 +01:00
2026-10-09 02:51:03 +01:00
2026-10-11 21:06:09 +01:00
2026-10-12 22:58:40 +01:00
2026-10-14 22:53:26 +01:00
2026-10-07 17:26:17 +01:00
2026-10-07 17:52:47 +01:00
2026-10-13 22:21:43 +01:00
2026-10-16 18:21:28 +01:00
2026-10-14 22:31:57 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 22:37:54 +01:00
2026-10-13 11:14:22 +01:00
2026-10-16 17:12:53 +01:00
2026-10-13 11:14:26 +01:00
2026-10-09 19:46:57 +01:00
2026-10-08 14:27:06 +01:00
2026-10-10 21:37:39 +01:00
2026-10-13 10:26:57 +01:00
2026-10-13 10:26:57 +01:00
2026-10-16 17:10:31 +01:00
2026-10-16 17:10:31 +01:00
2026-10-10 21:20:29 +01:00
2026-10-12 14:49:28 +01:00
2026-10-13 11:14:16 +01:00
2026-10-09 19:18:06 +01:00
2026-10-06 20:54:35 +01:00
2026-10-14 22:31:57 +01:00
2026-10-14 22:31:57 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-10-09 19:18:06 +01:00
2026-10-10 01:13:46 +01:00
2026-10-07 17:26:00 +01:00
2026-10-12 23:02:44 +01:00
2026-10-12 23:02:50 +01:00
2026-10-16 17:10:31 +01:00
2026-10-16 17:11:41 +01:00
2026-10-10 22:11:03 +01:00
2026-10-13 11:14:16 +01:00
2026-10-20 10:35:23 +01:00
2026-10-20 10:35:22 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-20 10:35:22 +01:00
2026-10-12 22:38:11 +01:00
2026-10-16 17:10:31 +01:00
2026-10-11 20:47:44 +01:00
2026-10-11 20:49:42 +01:00
2026-10-10 01:24:41 +01:00
2026-10-12 22:58:40 +01:00
2026-10-07 17:26:00 +01:00
2026-10-09 19:18:06 +01:00
2026-10-13 22:53:44 +01:00
2026-10-16 17:12:53 +01:00
2026-10-07 17:26:17 +01:00
2026-10-07 17:26:17 +01:00
2026-10-09 19:18:06 +01:00
2026-10-13 11:16:15 +01:00
2026-10-13 11:14:16 +01:00
2026-10-14 22:53:26 +01:00
2026-10-14 22:53:26 +01:00
2026-10-10 01:13:46 +01:00
2026-10-07 17:26:00 +01:00
2026-10-11 20:49:42 +01:00
2026-10-12 14:49:34 +01:00
2026-10-13 11:14:30 +01:00
2026-10-13 11:14:30 +01:00
2026-10-08 14:27:06 +01:00
2026-10-13 10:27:02 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 12:16:17 +01:00
2026-10-12 13:01:40 +01:00
2026-10-12 22:37:54 +01:00
2026-10-12 22:37:55 +01:00
2026-10-08 14:28:20 +01:00
2026-10-08 14:29:00 +01:00
2026-10-08 14:29:19 +01:00
2026-10-12 13:02:22 +01:00
2026-10-16 17:11:42 +01:00
2026-10-10 01:33:40 +01:00
2026-10-12 22:37:54 +01:00
2026-10-08 14:28:54 +01:00
2026-10-16 17:11:41 +01:00
2026-10-10 01:28:39 +01:00
2026-10-13 22:53:44 +01:00
2026-10-12 13:01:00 +01:00
2026-10-12 22:58:40 +01:00
2026-10-10 01:01:10 +01:00
2026-10-09 19:17:53 +01:00
2026-10-08 14:27:06 +01:00
2026-10-10 22:11:03 +01:00
2026-10-16 17:12:53 +01:00
2026-10-09 02:48:23 +01:00
2026-10-14 22:34:17 +01:00
2026-10-11 21:06:10 +01:00
2026-10-13 11:14:16 +01:00
2026-10-10 21:20:29 +01:00
2026-10-12 12:18:15 +01:00
2026-10-07 17:26:00 +01:00
2026-10-16 18:25:28 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 17:13:49 +01:00
2026-10-11 21:06:10 +01:00
2026-10-16 17:13:54 +01:00
2026-10-12 14:49:29 +01:00
2026-10-09 19:17:53 +01:00
2026-10-09 19:18:06 +01:00
2026-10-16 18:21:34 +01:00
2026-10-07 17:26:00 +01:00
2026-10-16 17:12:42 +01:00
2026-10-07 17:26:00 +01:00
2026-10-10 22:11:03 +01:00
2026-10-08 14:27:06 +01:00
2026-10-13 11:14:16 +01:00
2026-10-20 10:35:25 +01:00
2026-10-13 11:14:16 +01:00
2026-10-12 22:37:54 +01:00
2026-10-09 19:18:06 +01:00
2026-10-11 20:49:48 +01:00
2026-10-10 21:38:54 +01:00
2026-10-16 17:11:41 +01:00
2026-10-07 17:26:11 +01:00
2026-10-11 20:47:44 +01:00
2026-10-09 19:18:06 +01:00
2026-10-12 23:02:50 +01:00
2026-10-07 17:26:00 +01:00
2026-10-14 22:53:26 +01:00
2026-10-12 22:58:40 +01:00