Skip to content

Commit

Permalink
Update to latest Lape (unused var hints!)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsAD committed Oct 4, 2016
1 parent 73deaec commit 7d5aa8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Units/MMLAddon/mmlpsthread.pas
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface
{$IFDEF USE_SQLITE}, msqlite3{$ENDIF}
{$IFDEF USE_LAPE}
, lpparser, lpcompiler, lptypes, lpvartypes, ffi, lpffi, lpffiwrappers,
lpeval, lpinterpreter, lputils, lpexceptions, LPDump
lpeval, lpinterpreter, lputils, lpmessages, LPDump
{$ENDIF};

const
Expand Down Expand Up @@ -258,6 +258,7 @@ TLPThread = class(TMThread)
procedure SetFonts(Fonts: TMFonts); override;
procedure Execute; override;
procedure Terminate; override;
procedure OnHint(Sender: TLapeCompilerBase; Msg: lpString);
function OnFindFile(Sender: TLapeCompiler; var FileName: lpString): TLapeTokenizerBase;
function OnHandleDirective(Sender: TLapeCompiler; Directive, Argument: lpString; InPeek, InIgnore: Boolean): Boolean;
end;
Expand Down Expand Up @@ -1388,6 +1389,7 @@ constructor TLPThread.Create(CreateSuspended: Boolean; TheSyncInfo: PSyncInfo; p
ExposeGlobals(Compiler);

Compiler['Move'].Name := 'MemMove';
Compiler.OnHint := @OnHint;
Compiler.OnFindFile := @OnFindFile;
Compiler.OnHandleDirective := @OnHandleDirective;

Expand Down Expand Up @@ -1515,6 +1517,11 @@ procedure TLPThread.SetFonts(Fonts: TMFonts);
Compiler.EndImporting;
end;

procedure TLPThread.OnHint(Sender: TLapeCompilerBase; Msg: lpString);
begin
psWriteLn(Msg);
end;

function TLPThread.OnFindFile(Sender: TLapeCompiler; var FileName: lpString): TLapeTokenizerBase;
begin
Result := nil;
Expand Down

0 comments on commit 7d5aa8f

Please sign in to comment.