mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-03 02:21:44 +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>
21 lines
543 B
COBOL
21 lines
543 B
COBOL
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. FIXEDFORMAT.
|
|
* Fixed-format COBOL with sequence numbers in cols 1-6
|
|
000100 ENVIRONMENT DIVISION.
|
|
000200 DATA DIVISION.
|
|
000300 WORKING-STORAGE SECTION.
|
|
000400 01 WS-COUNTER PIC 9(4) VALUE 0.
|
|
000500 01 WS-NAME PIC X(20).
|
|
000600
|
|
000700 PROCEDURE DIVISION.
|
|
000800 MAIN-PARA.
|
|
000900 PERFORM INIT-PARA
|
|
001000 PERFORM PROCESS-PARA
|
|
001100 STOP RUN.
|
|
001200
|
|
001300 INIT-PARA.
|
|
001400 MOVE 1 TO WS-COUNTER.
|
|
001500
|
|
001600 PROCESS-PARA.
|
|
001700 CALL "LOGGER"
|
|
001800 GOBACK.
|