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

Function main

tests/function_invoker.cpp:3–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include <covscript/covscript.hpp>
2
3int main(int argc, char *argv[]) {
4 if (argc <= 1)
5 return -1;
6 cs::bootstrap env(argc - 1, argv + 1);
7 env.run(argv[1]);
8 cs::function_invoker<cs::numeric(cs::numeric, cs::numeric)> test(cs::eval(env.context, "test"));
9 int result = test(1, 2).as_integer();
10 cs::function_invoker<void(cs::numeric)> println(cs::eval(env.context, "system.out.println"));
11 println(result);
12 return 0;
13}

Callers

nothing calls this directly

Calls 4

evalFunction · 0.85
testFunction · 0.85
printlnFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected