OILS / _gen / yaks / examples / hello.yaks.cc View on Github | oilshell.org

22 lines, 12 significant
1// examples/hello translated by yaks
2
3#include "mycpp/runtime.h"
4namespace hello {
5int main(List<BigStr*>* argv) {
6 return 42;
7}
8} // namespace hello
9int main(int argc, char **argv) {
10 mylib::InitCppOnly(); // Initializes gHeap
11
12 auto* args = Alloc<List<BigStr*>>();
13 for (int i = 0; i < argc; ++i) {
14 args->append(StrFromC(argv[i]));
15 }
16
17 int status = hello::main(args);
18
19 gHeap.ProcessExit();
20
21 return status;
22}