*** UPDATE ****
Removed the scripting engine for now. Too unable. I hope to add something better in the future.
Okay, so I got the scripting system implemented. It can compile Delphi 7 level syntax to 32 bit native code. You can run the whole script and/or call a script routine, create a script class instance and call its methods. Be in next build.
Code:
function Script_Create: TScript; stdcall; external LGL_DLL;
procedure Script_Destroy(var aScript: TScript); stdcall; external LGL_DLL;
procedure Script_Reset(aScript: TScript); stdcall; external LGL_DLL;
function Script_Compile(aScript: TScript; aArchive: TArchive; aFilename: PChar): Boolean; stdcall; external LGL_DLL;
function Script_ErrorCount(aScript: TScript): Integer; stdcall; external LGL_DLL;
function Script_WarningCount(aScript: TScript): Integer; stdcall; external LGL_DLL;
function Script_ErrorMessage(aScript: TScript; aIndex: Integer): PChar; stdcall; external LGL_DLL;
function Script_WarningMessage(aScript: TScript; aIndex: Integer): PChar; stdcall; external LGL_DLL;
procedure Script_SaveProgram(aScript: TScript; aFilename: PChar); stdcall; external LGL_DLL;
procedure Script_Run(aScript: TScript); stdcall; external LGL_DLL;
function Script_CallRoutine(aScript: TScript; aFullname: PChar; aParamList: array of OleVariant): OleVariant; stdcall; external LGL_DLL;
function Script_CreateObject(aScript: TScript; aClassName: PChar; aParamList: array of const): TObject; stdcall; external LGL_DLL;
procedure Script_DestroyObject(aScript: TScript; aObject: TObject); stdcall; external LGL_DLL;
function Script_CallMethod(aScript: TScript; aFullname: PChar; aInstance: TObject; aParamList: array of OleVariant): OleVariant; stdcall; external LGL_DLL;
function Script_GetAddress(aScript: TScript; aFullname: PChar): Pointer; stdcall; external LGL_DLL;
procedure Script_SetCompileEvent(aScript: TScript; aEvent: TScriptCompileEvent); stdcall; external LGL_DLL;
function Script_CompileEvent(aScript: TScript): TScriptCompileEvent; stdcall; external LGL_DLL;
Bookmarks