Program

class Program {
uint errors;
CallContext* callcontext;
FunctionDefinition globalfunction;
Program program;
uint lcid;
d_string slist;
}

Members

Functions

compile
void compile(d_string progIdentifier, d_string srctext, FunctionDefinition* pfd)

Two ways of calling this: 1. with text representing group of topstatements (pfd == null) 2. with text representing a function name & body (pfd != null)

execute
void execute(d_string[] args)

Execute program. Throw ScriptException on error.

Static functions

getProgram
Program getProgram()

Get/Set Program associated with this thread. This enables multiple scripts (Programs) running simultaneously in different threads. It is needed because which Program is being run is essentially global data - and this makes it thread local data.

Meta