MCPcopy Create free account
hub / github.com/YosysHQ/nextpnr / main

Function main

3rdparty/python-console/test_python_interpreter.cpp:4–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "Interpreter.h"
3
4int main( int argc, char *argv[] )
5{
6 std::string commands[] = {
7 "from time import time,ctime\n",
8 "print('Today is',ctime(time()))\n"
9 };
10 Interpreter::Initialize( );
11 Interpreter* interpreter = new Interpreter;
12 for ( int i = 0; i < 2; ++i )
13 {
14 int err;
15 std::string res = interpreter->interpret( commands[i], &err );
16 std::cout << res;
17 }
18 delete interpreter;
19
20 Interpreter::Finalize( );
21 return 0;
22}

Callers

nothing calls this directly

Calls 1

interpretMethod · 0.80

Tested by

no test coverage detected