TorqueScript  0.2
interpreterInit.cpp

Constructs a new interpreter with the default configuration.

See also
TorqueScript::InterpreterConfiguration
#include <torquescript/interpreter.hpp>
#include <torquescript/libraries/libraries.hpp>
int main(int argc, char* argv[])
{
// Initialize interpreter configuration - this is optional but can be used to set settings
config.mMaxRecursionDepth = 1024;
// Initialize interpreter
TorqueScript::Interpreter interpreter(config);
TorqueScript::registerAllLibraries(&interpreter);
// Ask interpreter to evaluate a statement
interpreter.evaluate("echo(\"Hi\");");
return 0;
}
The interpreter class represents a high level instance of the TorqueScript interpreter....
Definition: interpreter.hpp:46
A structure representing overall interpreter runtime configuration. Some settings can be changed at r...
Definition: interpreterconfiguration.hpp:26
unsigned int mMaxRecursionDepth
Maximum call stack depth. If set to 0, no maximum call depth is enforced.
Definition: interpreterconfiguration.hpp:37