superbol-studio-oss
superbol-studio-oss copied to clipboard
Rigid order of paragraphs in configuration section
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.
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).
Fixed in #331