blockExpr.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "core/ast/expr.hpp"
5
6namespace by {
7
8 class visitor;
9 class errReport;
10
15 class _nout blockExpr: public expr {
16 BY(CLASS(blockExpr, expr, expr::exprType), VISIT())
17 friend class verifier;
18 friend class func;
19
20 public:
21 blockExpr();
22
23 template <typename... Es> blockExpr(const Es&... elems): _exprs(elems...) {}
24
25 public:
26 using super::run;
27 str run(const args& a) override;
28
29 str getEval() const override;
30
31 void setEval(const node& newEval);
32 void setEval(const node* it) BY_SIDE_FUNC(setEval);
33
34 const narr& getStmts() const BY_CONST_FUNC(getStmts())
35 narr& getStmts();
36
37 void rel() override;
38
39 using super::inFrame;
40 void inFrame(const bicontainable* args) const override;
41
42 using super::outFrame;
43 void outFrame() const override;
44
45 void onCloneDeep(const clonable& from) override;
46
47 nbool isAbstract() const;
48
49 private:
50 narr _exprs;
51 str _eval;
52 };
53} // namespace by
Function call arguments container.
Definition: args.hpp:13
Block expression containing multiple statements.
Definition: blockExpr.hpp:15
str getEval() const override
Interface for objects that can be cloned.
Definition: clonable.hpp:12
Type information for expression nodes
Definition: expr.hpp:22
Base class for all expressions.
Definition: expr.hpp:15
Function definition in byeol language.
Definition: func.hpp:20
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Template bidirectional container interface.
Definition: tbicontainable.hpp:17
AST verifier for semantic analysis.
Definition: verifier.hpp:20