mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-22 00:31:17 +00:00
Adds the three files Unit 2 of the C# scope-resolution plan calls for:
- `import-decomposer.ts` — inspects each `using_directive` node and
synthesizes `@import.kind/source/name/alias` markers. Kinds:
`namespace` — `using X;` / `using X.Y.Z;`
`alias` — `using Alias = X.Y.Z;` (generics stripped)
`static` — `using static X.Y;`
`global using` maps to namespace (plan's deferred decision); the
`global::` qualifier is stripped before emitting.
- `interpret.ts` — reads the markers and builds `ParsedImport`. Static
using maps to `kind: 'wildcard'` since it brings members into
unqualified scope; Unit 4's merge-bindings tiers wildcards lowest.
Also provides `interpretCsharpTypeBinding` with nullable/single-arg
generic/qualifier stripping so receiver-typed resolution sees the
concrete class name.
- `import-target.ts` — suffix-match adapter returning a single primary
file. Cross-file partial-class aggregation runs later at graph-bridge
time (Unit 6). The csproj-based `resolveCSharpImportInternal` stays
on the legacy path until Unit 7's parity gate surfaces a gap.
- `captures.ts` routes `@import.statement` matches through the
decomposer so the interpreter sees the markers it needs.
Tests cover every using flavor + resolution edge cases. 38/38 scope-
resolution C# unit tests pass; tsc clean.
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||
| global-setup.ts | ||
| vitest.d.ts | ||