로딩중...
검색중...
일치하는것 없음
closure.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
7
8namespace by {
9
10 class getExpr;
11 class func;
12 class defNestedFuncExpr;
13
20 class _nout closure: public baseFunc {
21 BY(ME(closure, baseFunc), CLONE(closure), VISIT())
22
23 public:
24 closure(const baseObj& org, const baseFunc& func);
25
26 public:
27 const ntype& getType() const override;
28
29 using super::subs;
30 scope& subs() override;
31
32 using super::prioritize;
33 priorType prioritize(const args& a) const override;
34
35 const modifier& getModifier() const override;
36
37 using super::eval;
38 str eval(const args& a) override;
39
40 const baseObj& getOrigin() const override;
41
42 const baseFunc& getFunc() const;
43
44 using super::getParams;
45 params& getParams() override;
46
47 const node* getRet() const override;
48
49 const src& getSrc() const override;
50
51 static me* make(const node& e);
52 static me* make(const node* it) BY_SIDE_FUNC(make);
53
54 private:
55 static me* _make(const func& e);
56 static me* _make(const func* it) BY_SIDE_FUNC(_make) static me* _make(const getExpr& e);
57 static me* _make(const getExpr* it) BY_SIDE_FUNC(_make);
58 static me* _make(defNestedFuncExpr& e);
59 static me* _make(defNestedFuncExpr* it) BY_SIDE_FUNC(_make);
60
61 private:
62 tstr<baseObj> _org;
63 tstr<baseFunc> _func;
64 funcType _type;
65 };
66} // namespace by
Function or object evaluation arguments
Definition args.hpp:22
Base class for all function types
Definition baseFunc.hpp:41
Base class for representing byeol objects
Definition baseObj.hpp:73
func closure with captured object scope
Definition closure.hpp:20
params & getParams() override
const node * getRet() const override
Nested function definition expression
Definition defNestedFuncExpr.hpp:13
Function definition in byeol language
Definition func.hpp:38
script type for function objects in byeol language.
Definition funcType.hpp:11
Expression for property and method access
Definition getExpr.hpp:18
Access modifier for type members
Definition modifier.hpp:13
Base class for all AST nodes in the byeol language
Definition node.hpp:195
represents native c++ type system for byeol language
Definition ntype.hpp:33
Function parameter list container
Definition params.hpp:16
Source location information
Definition src.hpp:15
Definition tnarr.hpp:9
priorType
Definition tpriorities.hpp:10
to Top