runExpr.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
14 class _nout runExpr: public expr {
15 BY(CLASS(runExpr, expr, expr::exprType), VISIT())
16 friend class parser;
17
18 public:
19 runExpr(const node* meObj, const node& subject, const args& a);
20 runExpr(const node* meObj, const args& a);
21
22 public:
23 using super::run;
24 str run(const args& a) override;
25
26 str getEval() const override;
27
28 node* getMe();
29 const node* getMe() const BY_CONST_FUNC(getMe())
30
31 void setMe(const node& newMe);
32 void setMe(const node* it) BY_SIDE_FUNC(setMe);
33
34 node& getSubj();
35 const node& getSubj() const;
36
37 void setSubj(const node& new1);
38 void setSubj(const node* it) BY_SIDE_FUNC(setSubj);
39
40 args& getArgs();
41 const args& getArgs() const;
42
43 void onCloneDeep(const clonable& from) override;
44
45 private:
46 str _getSub(str me) const;
47
48 private:
49 str _me;
50 args _args;
51 mutable str _subject;
52 };
53} // namespace by
Function call arguments container.
Definition: args.hpp:13
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
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Parser for byeol language source code.
Definition: parser.hpp:43
Function/method call expression.
Definition: runExpr.hpp:14
str getEval() const override