mirror of
https://github.com/github/codeql.git
synced 2026-07-29 14:56:51 +02:00
Retarget the remaining member declarations to the swift-syntax AST. An `initializerDecl` becomes a `constructor_declaration` (its body optional, so a bodyless protocol requirement still maps); `deinitializerDecl`, `typeAliasDecl`, and `associatedTypeDecl` map to `destructor_declaration`, `type_alias_declaration`, and `associated_type_declaration` respectively. The tree-sitter subscript and preprocessor-diagnostic rules are dropped: their swift-syntax counterparts (`subscriptDecl`, `ifConfigDecl`) fall through to the `unsupported_node` fallback, producing the same output. This also removes the now-unused `type` unwrap rule (swift-syntax has no such wrapper node) and retires the last `ctx.literal` helper use in favour of a `tree!` leaf. PARITY(tree-sitter): the initializer's parameters are still not emitted, because the tree-sitter path dropped them too. Emitting them is a future improvement. This completes the rule migration: every declaration now maps through the swift-syntax front-end. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>