33 using EntryStmtList = std::list<common::Reference<const parser::EntryStmt>>;
34 using GenericSpecList =
35 std::list<common::Reference<const parser::GenericSpec>>;
41 static std::optional<ProgramTree> Build(
43 static std::optional<ProgramTree> Build(
45 static std::optional<ProgramTree> Build(
47 static std::optional<ProgramTree> Build(
49 static std::optional<ProgramTree> Build(
51 static std::optional<ProgramTree> Build(
53 static std::optional<ProgramTree> Build(
55 static std::optional<ProgramTree> Build(
57 static std::optional<ProgramTree> Build(
61 Program, Function, Subroutine, MpSubprogram, Module, Submodule, BlockData)
62 using Stmt = std::variant<
72 const parser::ExecutionPart *exec =
nullptr)
73 : name_{name}, spec_{spec}, exec_{exec} {}
77 const Stmt &stmt()
const {
return stmt_; }
78 bool isSpecificationPartResolved()
const {
79 return isSpecificationPartResolved_;
81 void set_isSpecificationPartResolved(
bool yes =
true) {
82 isSpecificationPartResolved_ = yes;
86 const parser::ExecutionPart *exec()
const {
return exec_; }
87 std::list<ProgramTree> &children() {
return children_; }
88 const std::list<ProgramTree> &children()
const {
return children_; }
89 const EntryStmtList &entryStmts()
const {
return entryStmts_; }
90 const GenericSpecList &genericSpecs()
const {
return genericSpecs_; }
92 Symbol::Flag GetSubpFlag()
const;
93 bool IsModule()
const;
94 bool HasModulePrefix()
const;
95 Scope *scope()
const {
return scope_; }
96 void set_scope(
Scope &);
104 void AddChild(ProgramTree &&);
108 template <
typename T>
113 template <
typename T>
115 endStmt_ = &stmt.source;
124 const parser::ExecutionPart *exec_{
nullptr};
125 std::list<ProgramTree> children_;
126 EntryStmtList entryStmts_;
127 GenericSpecList genericSpecs_;
128 Scope *scope_{
nullptr};
130 bool isSpecificationPartResolved_{
false};
Definition semantics.h:71
Definition parse-tree.h:3411
Definition parse-tree.h:2983