starter.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "core/ast/origin.hpp"
5#include "core/worker/worker.inl"
7
8namespace by {
9 class frames;
10
14 class _nout starter: public worker<str, node> {
16 BY(CLASS(starter, __super8))
17
18 public:
19 enum logFlag3 {
20 LOG_STRUCTURE = 1 << 7,
21 LOG_GRAPH_ON_EX = 1 << 8
22 };
23
24 public:
25 static inline const std::string MAIN = "main";
26
27 public:
28 void setArgs(const args& a);
29 void setArgs(const args* it) BY_SIDE_FUNC(setArgs);
30 args& getArgs();
31 const args& getArgs() const BY_CONST_FUNC(getArgs())
32
33 protected:
34 str _onWork() override;
35 void _prepare() override;
36
37 private:
38 node* _findMain(node& pak, const args& a);
39 void _prepareFrame(frames& fr);
40 str _postprocess(const str& res);
41
42 private:
43 str _pak;
44 tstr<args> _args;
45 };
46} // namespace by
Function call arguments container.
Definition: args.hpp:13
Container for execution frame stack.
Definition: frames.hpp:11
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Program execution starter.
Definition: starter.hpp:14
Base worker template for processing tasks.
Definition: worker.hpp:28