pub struct Program {Show 31 fields
pub id: String,
pub pos: Pos,
pub options: Vec<String>,
pub initial: bool,
pub recursive: bool,
pub common: bool,
pub working_storage: Vec<DataEntry>,
pub local_storage: Vec<DataEntry>,
pub linkage: Vec<DataEntry>,
pub screens: Vec<ScreenEntry>,
pub using: Vec<Param>,
pub returning: Option<String>,
pub paragraphs: Vec<Paragraph>,
pub files: Vec<FileDecl>,
pub sources: Vec<String>,
pub exec_declarations: Vec<ExecBlock>,
pub report_writer: ReportWriter,
pub declaratives: Declaratives,
pub oo: Option<Box<Oo>>,
pub environment: Environment,
pub nested: Vec<String>,
pub registers: Vec<String>,
pub callable: Vec<String>,
pub hidden: Vec<String>,
pub duplicates: Vec<(String, Pos)>,
pub linked: Vec<String>,
pub containers: Vec<Container>,
pub messages: Vec<Error>,
pub function: Option<Function>,
pub prototypes: Vec<Prototype>,
pub repository_functions: Vec<String>,
}Fields§
§id: String§pos: PosWhere its PROGRAM-ID names it.
options: Vec<String>Options from CBL and PROCESS cards, in the order written.
initial: boolPROGRAM-ID … IS INITIAL, or once compiled the INITIAL option: WORKING-STORAGE starts afresh on every CALL.
recursive: bool§common: boolPROGRAM-ID … IS COMMON, for a program another contains.
working_storage: Vec<DataEntry>§local_storage: Vec<DataEntry>LOCAL-STORAGE: fresh for every activation of the program.
linkage: Vec<DataEntry>§screens: Vec<ScreenEntry>The SCREEN SECTION’s entries, as written.
using: Vec<Param>PROCEDURE DIVISION USING: the LINKAGE items the caller’s arguments address.
returning: Option<String>§paragraphs: Vec<Paragraph>§files: Vec<FileDecl>Files declared by SELECT and described by FD, with their record descriptions.
sources: Vec<String>The program’s source file, then each COPY member, as positions index them.
exec_declarations: Vec<ExecBlock>EXEC blocks in the DATA DIVISION: SQL declarations, cursors and DECLARE SECTION markers.
report_writer: ReportWriterThe REPORT SECTION, and the DECLARATIVES that serve it.
declaratives: DeclarativesThe DECLARATIVES’ USE AFTER EXCEPTION/ERROR and USE FOR DEBUGGING procedures.
oo: Option<Box<Oo>>The REPOSITORY’s classes, and for a class definition or a method what it is.
environment: Environment§nested: Vec<String>The PROGRAM-IDs of the programs it directly contains.
registers: Vec<String>Special registers the PROCEDURE DIVISION names and no entry declares, which the compiler declares: WHEN-COMPILED.
callable: Vec<String>The contained programs of its compilation a CALL from it reaches (Language Reference, Conventions for program-names): those it directly contains, and each COMMON one that a program containing it directly contains, but itself and those that contain it.
The other contained programs of its compilation, and those containing it, which a CALL from it does not reach.
duplicates: Vec<(String, Pos)>For a separately compiled program, each name two of its programs share, where the second’s PROGRAM-ID is.
linked: Vec<String>The names a static CALL from it finds in its compilation: its source’s separately compiled programs and their ENTRY names, and in a bundle the other sources’ programs.
containers: Vec<Container>The programs that contain it, innermost first, with the names each declares GLOBAL.
messages: Vec<Error>The messages reading its source gave that did not stop the parse, in the order found.
function: Option<Function>FUNCTION-ID in place of PROGRAM-ID: a user-defined function, or a prototype of one.
prototypes: Vec<Prototype>The user-defined functions it may invoke: those defined or prototyped before it in its source, and a function itself.
repository_functions: Vec<String>The user-defined functions its REPOSITORY paragraph, or its outermost program’s, names. One with an intrinsic function’s name is invoked by that name only where it is named here.