-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A paragraph-name does not need to be qualified when its target is defined in the same section.
- Loading branch information
Showing
10 changed files
with
173 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* SuperBOL OSS Studio *) | ||
(* *) | ||
(* Copyright (c) 2022-2023 OCamlPro SAS *) | ||
(* *) | ||
(* All rights reserved. *) | ||
(* This source code is licensed under the GNU Affero General Public *) | ||
(* License version 3 found in the LICENSE.md file in the root directory *) | ||
(* of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
(** Utilities to deal with sections/paragraphs of PROCEDURE DIVISIONs *) | ||
|
||
open Unit_types | ||
|
||
let rec find | ||
?(in_section: procedure_section option) | ||
(procedure_name: Cobol_ptree.procedure_name) | ||
(procedure: procedure) | ||
: procedure_block = | ||
match in_section with | ||
| None -> | ||
Unit_qualmap.find procedure_name procedure.named | ||
| Some { section_paragraphs; _ } -> | ||
try | ||
Paragraph (Unit_qualmap.find procedure_name section_paragraphs.named) | ||
with Not_found -> find procedure_name procedure | ||
|
||
let rec full_qn | ||
?(in_section: procedure_section option) | ||
(procedure_name: Cobol_ptree.procedure_name) | ||
(procedure: procedure) | ||
= | ||
match in_section with | ||
| None -> | ||
(Unit_qualmap.find_binding procedure_name procedure.named).full_qn | ||
| Some { section_paragraphs; _ } -> | ||
try | ||
(Unit_qualmap.find_binding procedure_name section_paragraphs.named).full_qn | ||
with Not_found -> full_qn procedure_name procedure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(**************************************************************************) | ||
(* *) | ||
(* SuperBOL OSS Studio *) | ||
(* *) | ||
(* Copyright (c) 2022-2023 OCamlPro SAS *) | ||
(* *) | ||
(* All rights reserved. *) | ||
(* This source code is licensed under the GNU Affero General Public *) | ||
(* License version 3 found in the LICENSE.md file in the root directory *) | ||
(* of this source tree. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
||
(** Utilities to deal with sections/paragraphs of PROCEDURE DIVISIONs *) | ||
|
||
val find | ||
: ?in_section: Unit_types.procedure_section | ||
-> Cobol_ptree.qualname | ||
-> Unit_types.procedure | ||
-> Unit_types.procedure_block | ||
|
||
val full_qn | ||
: ?in_section: Unit_types.procedure_section | ||
-> Cobol_ptree.qualname | ||
-> Unit_types.procedure | ||
-> Cobol_ptree.qualname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.