Loading...
Searching...
No Matches
slot.hpp
Go to the documentation of this file.
1
2#pragma once
3
6#include "core/ast/origin.hpp"
7
8namespace by {
9
10 class visitor;
11
21 class _nout slot: public node {
22 BY(CLASS(slot, node), VISIT())
23
24 public:
25 slot(const manifest& manifest);
26 slot(const manifest& manifest, const obj& pack);
27
28 public:
29 manifest& getManifest();
30 const manifest& getManifest() const;
31 nbool isValid() const;
36 virtual obj& getPack();
37 const obj& getPack() const BY_CONST_FUNC(getPack())
38 void rel() override;
39
44 void addDependent(me& dependent);
45 void addDependent(me* it) BY_SIDE_FUNC(addDependent)
46
48
49 using super::subs;
50 scope& subs() override;
51
52 using super::prioritize;
53 priorType prioritize(const args& a) const override;
54
55 using super::eval;
56 str eval(const args& a) override;
57
59
67 virtual nbool _invalidate();
68 void _setValid(nbool valid);
69 str _onEvalSub(node& sub, const args& a) override;
70
71 private:
72 void _rel();
73
75 tstr<obj> _pak;
76
77 private:
78 manifest _manifest;
79 nbool _isValid;
80 tnarr<me> _dependents;
81 };
82
83 typedef tnmap<std::string, slot> slots;
84 typedef tnchain<std::string, slot> slotChain;
86} // namespace by
Function or object evaluation arguments.
Definition args.hpp:22
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
Byeol runtime environment object.
Definition obj.hpp:62
Pack slot.
Definition slot.hpp:21
virtual obj & getPack()
Retrieves the top-level object (obj) of this pack.
Definition tnarr.hpp:9
Definition tnbicontainer.hpp:8
Definition tnmap.hpp:11
#define BY_SIDE_FUNC(...)
Side function macros for safe pointer operations.
Definition sideFunc.hpp:24
Pack manifest information.
Definition manifest.hpp:32
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34
priorType
Definition tpriorities.hpp:10