superbol-studio-oss icon indicating copy to clipboard operation
superbol-studio-oss copied to clipboard

Rigid order of paragraphs in configuration section

Open engboris opened this issue 1 year ago • 1 comments

In the following program:

environment division.
configuration section.
repository. function all intrinsic. 
special-names. C01 is one-page.
input-output section.
file-control.

the keyword special-names produces an Invalid Syntax error with the VSCode extension. However, if we exchange the repository paragraph and the special-names one:

environment division.
configuration section.
special-names. C01 is one-page.
repository. function all intrinsic. 
input-output section.
file-control.

there is no error.

It seems to me that the LSP requires the special-names paragraph to occurs strictly after a repository paragraph. However, both are accepted by GnuCOBOL.

engboris avatar Jan 24 '24 17:01 engboris

Just a note: according to standard COBOL the order is fixed, GnuCOBOL will error with any strict std but "mf-strict" (this is where "order doesn't matter" comes from), so while this adjustment would be useful, it can be low priority.

Note: I do think about increasing the configuration from "ok" to "warning" for this option in default.conf (would still compile but nags the user with a warning he can disable).

GitMensch avatar Jan 24 '24 19:01 GitMensch

Fixed in #331

nberth avatar Aug 07 '24 11:08 nberth