Lazarus

Announcements => Third party => Topic started by: AlexTP on June 01, 2019, 11:38:35 am

Title: Emmet abbreviation engine
Post by: AlexTP on June 01, 2019, 11:38:35 am
https://github.com/Alexey-T/Emmet-Pascal

Read the readme.txt included in the Github.
It is Lazarus package + few demo apps.
Title: Re: Emmet abbreviation engine
Post by: engkin on June 01, 2019, 07:01:58 pm
Thank you for sharing.

Quote
Emmet engine for Delphi and Free Pascal (3.1+)
It compiles using 3.0.4 if emmet.pas uses unit strutils:
Code: Pascal  [Select][+][-]
  1. uses
  2. ..
  3.   {$else}
  4.   SysUtils, Dialogs, Math,
  5.   strutils {for PosEx};
  6.   {$endif}

and adds an overload for pos:
Code: Pascal  [Select][+][-]
  1. function Pos (const Substr, Source : String; Offset: SizeInt) : SizeInt; overload; inline;
  2. begin
  3.   Result := PosEx(SubStr, Source, Offset);
  4. end;

The hints about variables do "not seem to be initialized" need simple changes in function declarations to use out instead of var.



To compile the demo projects I had to delete the lpi and res files, and get them regenerated again on my version of Lazarus 2.0.0.
Title: Re: Emmet abbreviation engine
Post by: AlexTP on June 01, 2019, 10:40:38 pm
Now compatible with FPC 3.0.4, thanks.
TinyPortal © 2005-2018