cymoca
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
statement.h
Go to the documentation of this file.
1 #ifndef CYMOCA_AST_STATEMENT_STATEMENT_H_
2 #define CYMOCA_AST_STATEMENT_STATEMENT_H_
3 
4 #include "../node.h"
5 
6 namespace cymoca::ast::statement {
7 
11 class List : public TList<Base, Base> {
12  public:
14  using TList::TList;
15  std::unique_ptr<INode> clone() const override { return cloneList<List>(); }
16 };
17 
22 class Block : public Base {
23  protected:
24  std::unique_ptr<condition::Base> m_condition{};
25  std::unique_ptr<List> m_statements{};
26 
27  public:
29 };
30 
34 class If : public TList<Block, Base> {
35  public:
37  using TList::TList;
38  std::unique_ptr<INode> clone() const override { return cloneList<If>(); }
39 };
40 
44 class When : public TList<Block, Base> {
45  public:
47  using TList::TList;
48  std::unique_ptr<INode> clone() const override { return cloneList<When>(); }
49 };
50 
51 } // namespace cymoca::ast::statement
52 
53 #endif
std::unique_ptr< INode > clone() const override
Definition: statement.h:48
std::unique_ptr< condition::Base > m_condition
Definition: statement.h:24
#define NODE_MACRO
Definition: node.h:15
std::unique_ptr< List > m_statements
Definition: statement.h:25
std::unique_ptr< INode > clone() const override
Definition: statement.h:15
std::unique_ptr< INode > clone() const override
Definition: statement.h:38