Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, const char* argv[]) {
- flow::lang::Interpreter interpreter;
- interpreter.registerFunction("greetings").param<std::string>("from").bind([](Params& params) {
- std::cout << "Greetings, " << params.getString(1) << '\n';
- });
- interpreter.compileSource(R"|
- main {
- greetings "World";
- }
- |");
- interpreter.run("main");
- }
Add Comment
Please, Sign In to add comment