OILS / _gen / mycpp / examples / pea_hello.pea.cc View on Github | oils.pub

41 lines, 16 significant
1// examples/pea_hello translated by pea_main
2
3// BEGIN mycpp output
4
5#include "mycpp/runtime.h"
6
7namespace pea_hello { // forward declare
8}
9
10
11namespace pea_hello { // declare
12
13int main(List<BigStr*>* argv);
14
15} // declare namespace pea_hello
16
17namespace pea_hello { // define
18
19
20int main(List<BigStr*>* argv) {
21 StackRoot _root0(&argv);
22
23 return 42;
24}
25
26} // define namespace pea_hello
27
28int main(int argc, char **argv) {
29 mylib::InitCppOnly(); // Initializes gHeap
30
31 auto* args = Alloc<List<BigStr*>>();
32 for (int i = 0; i < argc; ++i) {
33 args->append(StrFromC(argv[i]));
34 }
35
36 int status = pea_hello::main(args);
37
38 gHeap.ProcessExit();
39
40 return status;
41}