Recent

Author Topic: Emmet abbreviation engine  (Read 478 times)

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
Emmet abbreviation engine
« 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.

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: Emmet abbreviation engine
« Reply #1 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.
« Last Edit: June 01, 2019, 07:05:23 pm by engkin »

Alextp

  • Hero Member
  • *****
  • Posts: 901
    • UVviewsoft
Re: Emmet abbreviation engine
« Reply #2 on: June 01, 2019, 10:40:38 pm »
Now compatible with FPC 3.0.4, thanks.