| 1 | #include <covscript/covscript.hpp> |
| 2 | |
| 3 | int 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 | } |