Interface to a Compiler object that compiles sheep scripts. More...
#include <sheepcpp.h>
Public Member Functions | |
virtual void | Release ()=0 |
virtual SheepLanguageVersion | GetLanguageVersion ()=0 |
Gets the language version with which this compiler was created. | |
virtual int | DefineImportFunction (const char *name, SymbolType returnType, SymbolType parameters[], int numParameters)=0 |
virtual IScript * | CompileScript (const char *script)=0 |
Interface to a Compiler object that compiles sheep scripts.
|
pure virtual |
Compiles the given sheep script.
This function always returns an instance if IScript, even if the script wasn't successfully compiled. You must examine the IScript result to find out the results of the compilation. Be sure to call IScript::Release() when done with the IScript result.
script | 0-terminated string containing sheep script |
|
pure virtual |
Defines an import function.
name | The name of the import function to define |
returnType | The return type of the import function |
parameters | An array with a list of parameter types, or null if there are no parameters |
numParameters | The number of parameters. This should match the array length of "parameters" |
|
pure virtual |
Releases the Compiler, decreasing its reference count by 1.
When all references to the compiler have been released the compiler is deleted. Any active instances of IScript that have been created by this compiler are still alive.