type TIFPSPascalCompiler = class
Name | Description |
---|---|
FAllowNoBegin | |
FAllowNoEnd | |
FAllowUnit | |
FAutoFreeList | |
FAvailableTypes | |
FConstants | |
FContinueOffsets | |
FDebugOutput | |
FID | |
FIsUnit | |
FMessages | |
FOnExportCheck | |
FOnExternalProc | |
FOnUses | |
FOnUseVariable | |
FOnWriteLine | |
FOutput | |
FParser | |
FProcs | |
FRegProcs | |
FUsedTypes | |
FVars |
constructor Create; |
Create
destructor Destroy; override; |
Destroy the current instance of the script compiler
function AddConstant(const Name: string; FType: Cardinal): PIFPSConstant; |
Add a constant
function AddConstantN(const Name, FType: string): PIFPSConstant; |
Add a constant
function AddFunction(const Header: string): PIFPSRegProc; |
Add a function
procedure AddToFreeList(Obj: TObject); |
Add an object to the auto-free list
function AddType(const Name: string; const BaseType: TIFPSBaseType): PIFPSType; |
add a type
function AddTypeCopy(const Name: string; TypeNo: Cardinal): PIFPSType; |
Add a type copy type
function AddTypeCopyN(const Name, FType: string): PIFPSType; |
Add a type copy type
function AddTypeS(const Name, Decl: string): PIFPSType; |
Add a type declared in a string
function AddUsedFunction(var Proc: PIFPSProcedure): Cardinal; |
function AddUsedFunction2(var Proc: PIFPSUsedRegProc): Cardinal; |
function AddUsedVariable(const Name: string; FType: Cardinal): PIFPSVar; |
Add an used variable
function AddUsedVariableN(const Name, FType: string): PIFPSVar; |
add an used variable (with named type)
function AddVariable(const Name: string; FType: Cardinal): PIFPSVar; |
Add a variable
function AddVariableN(const Name, FType: string): PIFPSVar; |
Add a variable
function AT2UT(L: Cardinal): Cardinal; |
procedure Clear; |
Clear the current data
function Compile(const s: string): Boolean; |
Compile a script (s)
procedure Debug_SavePosition(ProcNo: Cardinal; Proc: PIFPSProcedure); |
procedure Debug_WriteParams(ProcNo: Cardinal; Proc: PIFPSProcedure); |
procedure DefineStandardTypes; |
function DoTypeBlock(FParser: TIfPascalParser): Boolean; |
function DoVarBlock(proc: PIFPSProcedure): Boolean; |
function FindType(const Name: string): Cardinal; |
Search for a type
function GetAvailableType(No: Cardinal): PIFPSType; |
function GetAvailableTypeCount: Cardinal; |
function GetBooleanType(FOnlyAvailTypes: Boolean): Cardinal; |
function GetDebugOutput(var s: string): Boolean; |
Return the debugger output
function GetInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Longint; |
function GetMsg(l: Longint): PIFPSPascalCompilerMessage; |
function GetMsgCount: Longint; |
function GetOutput(var s: string): Boolean; |
Return the output
function GetProc(No: Cardinal): PIFPSProcedure; |
function GetProcCount: Cardinal; |
function GetReal(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Extended; |
function GetString(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): string; |
function GetTypeCopyLink(p: PIFPSType): PIFPSType; |
function GetUInt(FUseTypes: TIFList; Src: PIfVariant; var s: Boolean): Cardinal; |
function GetUsedType(No: Cardinal): PIFPSType; |
function GetUsedTypeCount: Cardinal; |
function GetVariable(No: Cardinal): PIFPSVar; |
function GetVariableCount: Cardinal; |
function IsDuplicate(const s: string): Boolean; |
function MakeDecl(decl: string): string; |
function MakeError(const Module: string; E: TIFPSPascalCompilerError; const Param: string): PIFPSPascalCompilerMessage; |
Add an error the messages
function MakeHint(const Module: string; E: TIFPSPascalCompilerHint; const Param: string): PIFPSPascalCompilerMessage; |
Add a hint to the messages
function MakeWarning(const Module: string; E: TIFPSPascalCompilerWarning; const Param: string): PIFPSPascalCompilerMessage; |
Add a warning to the messages
function NewProc(const Name: string): PIFPSProcedure; |
function PreCalc(FUseTypes: TIFList; Var1Mod: Byte; var1: PIFVariant; Var2Mod: Byte; Var2: PIfVariant; Cmd: Byte; Pos: Cardinal): Boolean; |
function ProcessFunction: Boolean; |
function ProcessLabel(Proc: PIFPSProcedure): Boolean; |
function ProcessLabelForwards(Proc: PIFPSProcedure): Boolean; |
function ProcessSub(FType: TSubOptType; ProcNo: Cardinal; proc: PIFPSProcedure): Boolean; |
function ReadConstant(StopOn: TIfPasToken): PIfVariant; |
function ReadType(const Name: string; FParser: TIfPascalParser): Cardinal; |
procedure ReplaceTypes(var s: string); |
procedure UpdateRecordFields(r: Pointer); |
function UseAvailableType(No: Cardinal): Cardinal; |
procedure WriteDebugData(const s: string); |
AllowNoBegin: Boolean; |
Allow no main begin/end
AllowNoEnd: Boolean; |
Allow it to have no END on the script (only works when AllowNoBegin is true)
AllowUnit: Boolean; |
Allow a unit instead of program
ID: Pointer; |
Tag
IsUnit: Boolean; |
contains true if the current file is a unit
Msg[l: Longint]: PIFPSPascalCompilerMessage; |
The messages/warnings/errors
MsgCount: Longint; |
contains the number of messages
OnExportCheck: TIFPSOnExportCheck; |
OnExportCheck is called for each function to check if it needs to be exported and has the correct parameters
OnExternalProc: TIFPSOnExternalProc; |
OnExternalProc is called when an external token is found after a procedure header
OnUses: TIFPSOnUses; |
OnUses i scalled for each Uses and always first with 'SYSTEM' parameters
OnUseVariable: TIFPSOnUseVariable; |
The OnUseVariant event is called when a variable is used by the script engine
OnWriteLine: TIFPSOnWriteLineEvent; |
OnWriteLine is called after each line