MCPcopy Create free account
hub / github.com/covscript/covscript / bootstrap

Class bootstrap

include/covscript/covscript.hpp:130–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 using cs_function_invoker_impl::function_invoker;
129
130 class bootstrap final {
131 public:
132 context_t context;
133
134 // Bootstrap from string initializer list
135 bootstrap(std::initializer_list<std::string> l) : context(create_context({l.begin(), l.end()})) {}
136
137 // Classic bootstrap from command line
138 bootstrap(int argc, char *argv[]) : context(create_context(parse_cmd_args(argc, argv))) {}
139
140 // Zero initialization bootstrap
141 bootstrap() : context(create_context({"<BOOTSTRAP_ENV>"})) {}
142
143 ~bootstrap()
144 {
145 collect_garbage(context);
146 }
147
148 void run(const std::string &path)
149 {
150 context->instance->compile(path);
151 context->instance->interpret();
152 }
153 };
154} // namespace cs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected