25 #include "../util/ast_util.hpp"
36 : _composition_list(cl), _element_list(el), _annot(nullptr), _ext(nullptr)
48 AST_CompositionElementListIterator it;
49 AST_ElementListIterator el_it;
77 AST_ElementListIterator _element_list_it;
81 AST_CompositionElementListIterator _composition_list_it;
97 AST_ArgumentListIterator _annot_it;
98 foreach (_annot_it,
_annot) {
101 if (
_ext !=
nullptr) {
102 _ext->accept(visitor);
104 visitor->
leave(
this);
117 if (
_ext ==
nullptr) {
137 AST_ElementListIterator it;
146 AST_EquationListIterator it;
147 AST_StatementListIterator st_it;
149 if (ce.
_eqs_algs->getEquations()->size() > 0) {
151 ret << (ce.
_eqs_algs->isInitial() ?
"initial " :
"");
152 ret <<
"equation" << endl;
155 foreach (it, ce.
_eqs_algs->getEquations()) {
159 if (ce.
_eqs_algs->getAlgorithms()->size() > 0) {
161 ret << (ce.
_eqs_algs->isInitial() ?
"initial " :
"");
162 ret <<
"algorithm" << endl;
165 foreach (st_it, ce.
_eqs_algs->getAlgorithms()) {
170 AST_ElementListIterator et;
171 if (ce.
_el !=
nullptr) {
172 if (ce.
_el->size() > 0) {
173 ret <<
"public" << endl;
175 foreach (et, ce.
_el) {
185 visitor->
visit(
this);
189 AST_ElementListIterator _el_it;
190 foreach (_el_it,
_el) {
193 visitor->
leave(
this);
214 if (
_el ==
nullptr) {
217 return _el->size() > 0;
238 visitor->
visit(
this);
239 AST_EquationListIterator _eq_it;
240 foreach (_eq_it,
_eq) {
243 AST_StatementListIterator _st_it;
244 foreach (_st_it,
_st) {
247 visitor->
leave(
this);
252 if (
_eq ==
nullptr) {
255 return _eq->size() > 0;
260 if (
_st ==
nullptr) {
263 return _st->size() > 0;
275 AST_ArgumentList annot)
276 : _lang(lang), _annot(annot), _exp(args), _cr(cr)
291 visitor->
visit(
this);
292 AST_ArgumentListIterator _annot_it;
293 foreach (_annot_it,
_annot) {