Skip to content

Commit

Permalink
Apply minor formatting adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
nberth authored Aug 6, 2024
1 parent 5b56150 commit 9253373
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
- COBOL language configuration for highlighting matching brackets and auto-insertion of line numbers in fixed-format code [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330)

### Fixed
- Word wrapping in presence of hyphens [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330)
- Improvements to the grammar [#331](https://github.com/OCamlPro/superbol-studio-oss/pull/331)
- Word wrapping in presence of hyphens [#330](https://github.com/OCamlPro/superbol-studio-oss/pull/330)


## [0.1.3] Fourth α release (2024-07-24)
Expand Down
4 changes: 0 additions & 4 deletions src/lsp/cobol_ptree/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ type 'a nel = 'a NEL.t
let pp_nel ppe = NEL.pp ~fsep:"@ " ~fopen:"" ~fclose:"" ppe

type permutation_duo = AB | BA
[@@deriving ord]

and trio_head = A3 | B3 | C3
[@@deriving ord]

and permutation_trio = trio_head * permutation_duo
[@@deriving ord]

and quartet_head = A4 | B4 | C4 | D4
[@@deriving ord]

and permutation_quartet = quartet_head * permutation_trio
[@@deriving ord]
Expand Down
16 changes: 8 additions & 8 deletions src/lsp/cobol_ptree/env_division.ml
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,11 @@ let pp_configuration_section ppf
special_names_paragraph = snp; repository_paragraph = rp; conf_sec_order }
=
Fmt.pf ppf "CONFIGURATION SECTION.";
iter_quartet conf_sec_order (scp, ocp, snp, rp) (
Fmt.(option (sp ++ pp_with_loc pp_source_computer_paragraph)) ppf,
Fmt.(option (sp ++ pp_with_loc pp_object_computer_paragraph)) ppf,
Fmt.(option (sp ++ pp_with_loc pp_special_names_paragraph)) ppf,
Fmt.(option (sp ++ pp_with_loc pp_repository_paragraph)) ppf)
iter_quartet conf_sec_order (scp, ocp, snp, rp)
Fmt.(option (sp ++ pp_with_loc pp_source_computer_paragraph) ppf,
option (sp ++ pp_with_loc pp_object_computer_paragraph) ppf,
option (sp ++ pp_with_loc pp_special_names_paragraph) ppf,
option (sp ++ pp_with_loc pp_repository_paragraph) ppf)

let pp_record_delimiter ppf = function
| Standard_1 -> Fmt.pf ppf "STANDARD-1"
Expand Down Expand Up @@ -662,6 +662,6 @@ let pp_environment_division ppf
{ env_configuration = ec; env_input_output = eio; env_order }
=
Fmt.pf ppf "ENVIRONMENT DIVISION.";
iter_duo env_order (ec, eio) (
Fmt.(option (sp ++ pp_with_loc pp_configuration_section)) ppf,
Fmt.(option (sp ++ pp_with_loc pp_input_output_section)) ppf)
iter_duo env_order (ec, eio)
Fmt.(option (sp ++ pp_with_loc pp_configuration_section) ppf,
option (sp ++ pp_with_loc pp_input_output_section) ppf)
8 changes: 4 additions & 4 deletions src/lsp/cobol_ptree/env_division_visitor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ let fold_configuration_section' (v: _ #folder) =

let fold_environment_division (v: _ #folder) =
handle v#fold_environment_division
~continue:begin fun { env_configuration; env_input_output; env_order } x ->
x >> fold_duo env_order (env_configuration, env_input_output) (
fold_option ~fold:fold_configuration_section' v,
fold_option ~fold:fold_input_output_section' v)
~continue:begin fun { env_configuration; env_input_output; env_order } x -> x
>> fold_duo env_order (env_configuration, env_input_output)
(fold_option ~fold:fold_configuration_section' v,
fold_option ~fold:fold_input_output_section' v)
end

let fold_environment_division' (v: _ #folder) =
Expand Down

0 comments on commit 9253373

Please sign in to comment.