mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-10 03:27:59 +00:00
* feat(cobol): migrate COBOL to scope-based resolution (regex provider)
Migrate COBOL to scope-based registry resolution, validating the
parse-source-agnostic contract — COBOL uses regex, not tree-sitter,
but implements the same LanguageProvider interface via emitScopeCaptures.
Phase 1-5 complete per #941 DoD.
New files:
languages/cobol/captures.ts — emitScopeCaptures wrapping regex tagger
languages/cobol/interpret.ts — import/type-binding/receiver hooks
languages/cobol/index.ts — barrel export
languages/cobol/scope-resolver.ts — ScopeResolver wiring (9 fields, 3 toggles)
Modified files:
languages/cobol.ts — wire 4 scope-resolution hooks
registry.ts — register cobolScopeResolver
registry-primary-flag.ts — document REGISTRY_PRIMARY_COBOL
Fixtures:
17 fixture files, 30 test cases across 11 required classes
test/integration/resolvers/cobol-scope.test.ts
Tests: 24/24 pass (default + REGISTRY_PRIMARY_COBOL=0)
tsc: zero cobol-specific errors
Shadow mode (GITNEXUS_SHADOW_MODE=1): zero crashes
Regex perf: 10K-line file in 408ms (threshold: 2000ms)
NOT added to MIGRATED_LANGUAGES — REGISTRY_PRIMARY_COBOL env var only.
* chore(cobol): add COBOL to MIGRATED_LANGUAGES
* Revert "chore(cobol): add COBOL to MIGRATED_LANGUAGES"
This reverts commit f234330e9f.
* fix(cobol): revert MIGRATED_LANGUAGES flip, fix JSDoc dup, fix arityCompatibility
---------
Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
20 lines
600 B
COBOL
20 lines
600 B
COBOL
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. MALFORMED.
|
|
DATA DIVISION.
|
|
WORKING-STORAGE SECTION.
|
|
01 WS-PGM PIC X(8) VALUE "OTHER".
|
|
PROCEDURE DIVISION.
|
|
MAIN.
|
|
* Incomplete statement (no period)
|
|
MOVE "TEST" TO WS-PGM
|
|
* CALL USING on separate lines
|
|
CALL "TARGET"
|
|
USING WS-PGM
|
|
RETURNING WS-PGM
|
|
* CALL without END-CALL across lines
|
|
CALL "MULTILINE"
|
|
USING WS-PGM
|
|
* GO TO with multiple targets
|
|
GO TO MAIN EXIT-PARA.
|
|
EXIT-PARA.
|
|
GOBACK.
|