Loading...
Searching...
No Matches
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
24 class _nout blockExpr: public expr {
26
27 public:
28 blockExpr();
29
37 template <typename... Es> blockExpr(const Es&... elems): _exprs(elems...) {}
38
39 public:
40 using super::eval;
41 str eval(const args& a) override;
42
43 str infer() const override;
44
49 void setEval(const node& newEval);
50 void setEval(const node* it) BY_SIDE_FUNC(setEval);
51
52 const narr& getStmts() const BY_CONST_FUNC(getStmts())
53 narr& getStmts();
54
55 void rel() override;
56
57 using super::inFrame;
58 void inFrame(const bicontainable* args) const override;
59
60 using super::outFrame;
61 void outFrame() const override;
62
63 void onCloneDeep(const clonable& from) override;
64
70 nbool isAbstract() const;
71
72 private:
73 narr _exprs;
74 str _eval;
75 };
76} // namespace by
Function or object evaluation arguments.
Definition args.hpp:22
Block expression.
Definition blockExpr.hpp:24
void setEval(const node &newEval)
Sets the node whose evaluation result will be returned by this block expression.
str infer() const override
Type information for expression nodes
Definition expr.hpp:45
Base class for all expressions.
Definition expr.hpp:36
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
Definition tnarr.hpp:9
to Top