Skip to content

Floating *> comment helpers live in core.cobol_preprocessor (Part of #5648) - #5785

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5648-20261020T2059Z
Oct 20, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5648-20261020T2059Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5648 (slice 5).

What

The translator's literal-aware floating *> comment helpers (_comment_at, _open_literal, _drop_comment, _free_code) move to core.cobol_preprocessor as comment_at, open_literal, drop_comment, free_code. det/source.py and readiness/inventory.py import them. Logic is moved verbatim (free_code is now line[:comment_at(line)], same result).

Class

Text-level front-end helpers still duplicated between scanner and translator. This PR: floating *> comment + open literal (translator side, no scanner copy existed with literal awareness).

Evidence

  • test_cobol_preprocessor_5648.py 57 pass (new: marker in a literal, doubled quote, whole-line comment, none; translator holds no copy).
  • tests/cobol_mainframe -k "det or layout or free or copy or comment or feature_inventory": 2621 passed, 245 skipped.
  • pr_gates --fast 6/6, --ratchets 8/8 (fact-crosscheck and ports unchanged), audit_check clear, tree-wide guards green.
  • Golden masters not re-run: no scanner code changed (additive functions in core only).

Remaining slices (#5648)

  1. det/source.py layout: as_fixed / as_fixed_rows (:~1001), fixed/free line splitting (indicator, col 72) onto core.cobol_source_format.
  2. Line map: expanded line -> (file, line), shared type in core, consumed by expand().
  3. >>IF/>>ELSE/>>END-IF/>>DEFINE shared expander using core.compiler_options.
  4. Translator expand() / _replacing onto a core expand(source, libraries); EXEC SQL INCLUDE expansion.
  5. docs/language_status/fact_ownership.md note.

Sibling gaps

  • core/data_moves.py:140 and core/cics_macro_level.py:92 cut *> with no literal awareness ('*>' literal truncated). Burned-estate need: none found in this slice (not measured); would shift scanner output, needs golden.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 20, 2026 17:01
…code live in core.cobol_preprocessor (Part of #5648)

The translator's literal-aware `*>` comment helpers move to the shared module; det/source.py and the
readiness inventory import them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 20, 2026 21:22
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 21:43
@squid-protocol
squid-protocol merged commit 040d4ed into main Oct 20, 2026
89 checks passed
@squid-protocol
squid-protocol deleted the churn/5648-20261020T2059Z branch October 20, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant