nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
118 stars 28 forks source link

Simplify and optimize defines #164

Closed ollydev closed 3 years ago

ollydev commented 3 years ago

Made defines a simple array. This is a lot faster with all the getState the compiler does.

TLapeDefine = record Name, Value: lpString; end;
TLapeDefineArray = array of TLapeDefine;

Added OnFindMacro property.

TLapeFindMacro = function(Sender: TLapeCompiler; Name: lpString; var Value: lpString): Boolean of object;