Skip to content

command 'superbol-free reformat to-free FILES.cob'#201

Open
lefessan wants to merge 2 commits intoOCamlPro:masterfrom
lefessan:z-2024-03-06-reformat
Open

command 'superbol-free reformat to-free FILES.cob'#201
lefessan wants to merge 2 commits intoOCamlPro:masterfrom
lefessan:z-2024-03-06-reformat

Conversation

@lefessan
Copy link
Copy Markdown
Member

@lefessan lefessan commented Mar 7, 2024

Translate files from fixed to free format

In case it can be useful to somebody else...

Translate files from fixed to free format
@nberth
Copy link
Copy Markdown
Collaborator

nberth commented Mar 7, 2024

If you were using cobol_preproc you'd get proper right-padding of alphanumerics that are broken across several lines, along with support for change-of-format compiler directives (that can often be seen at the top of COBOL source files).

Anyways, given the stated restriction on fixed format, I'd suggest to rename the command into "reformat fixed-to-free".

@GitMensch
Copy link
Copy Markdown
Contributor

@lefessan If you add that - a reverse command would be much more useful, as many peprocessors only handle fixed-form reference-format.

@nberth: I think you should be able to package a native binary of cobol_preproc with the LSP which allows an extension command (or multiple ones) to trigger that.

* call indenter at the end of formatting
* parse compiler directives to change the format in the middle of source files
* prepare for free-2-fixed conversion
@GitMensch
Copy link
Copy Markdown
Contributor

friendly ping @nberth @lefessan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants