로딩중...
검색중...
일치하는것 없음
getExpr.hpp
이 파일의 문서화 페이지로 가기
1
2
3#pragma once
4
5#include "core/ast/expr.hpp"
6#include "core/ast/params.hpp"
7
8namespace by {
9
10 class visitor;
11 class closure;
12
18 class _nout getExpr: public expr {
20 friend class coreInternal;
21
22 public:
23 getExpr(const std::string& name);
24 getExpr(const std::string& name, const args& a);
25 getExpr(const node& me, const std::string& name);
26 getExpr(const node& me, const std::string& name, const args& a);
27
28 public:
29 using super::eval;
30 str eval(const args& a) override;
31
32 str infer() const override;
33 const node* getMe() const;
34 const std::string& getName() const;
35 void setName(const std::string& new1);
36 void setName(const std::string* it) BY_SIDE_FUNC(setName)
41 void setMe(const node& newMe);
42
46 const args& getArgs() const;
47 void setArgs(const args& new1);
48
49 void onCloneDeep(const clonable& new1) override;
50
51 protected:
59 virtual node* _onGet(node& me) const;
60 virtual node* _onGet(node* it) const BY_SIDE_FUNC(it, _onGet(*it), nullptr);
61
62 private:
63 str _get(nbool evalMode) const;
64 str _evalMe(nbool evalMode) const;
65
66 private:
67 str _me;
68 std::string _name;
69 tstr<args> _args;
70 };
71} // namespace by
Function or object evaluation arguments
Definition args.hpp:22
Definition coreInternal.hpp:39
Type information for expression nodes
Definition expr.hpp:45
Base class for all expressions
Definition expr.hpp:36
Expression for property and method access
Definition getExpr.hpp:18
const args & getArgs() const
str infer() const override
virtual node * _onGet(node &me) const
Protected virtual method for the actual "get" logic.
void setName(const std::string *it) BY_SIDE_FUNC(setName) void setMe(const node &new Me)
Sets the base object ("me") for this access expression.
Base class for all AST nodes in the byeol language
Definition node.hpp:195
Definition tnarr.hpp:9
to Top