Lazarus

Using the Lazarus IDE => Editor => Topic started by: RayoGlauco on June 26, 2018, 07:27:15 pm

Title: JEDI code format does not work with operators
Post by: RayoGlauco on June 26, 2018, 07:27:15 pm
Hello,

I like to use JEDI code format in the Lazarus IDE, to get my code uniformly formatted. But recently I have declared several operators in a unit, and JEDI code format no longer works in that unit, even though the unit compiles ok.

Any idea or fix?
Title: Re: JEDI code format does not work with operators
Post by: Thaddy on June 26, 2018, 07:38:11 pm
Jedi Code Formatter is Delphi heritage. Delphi doesn't know about that syntax. Hence it will fail. Just fix it... I won't...
Title: Re: JEDI code format does not work with operators
Post by: RayoGlauco on June 26, 2018, 07:46:49 pm
OK thanks, Thaddy. I just don't want to reinvent the wheel.  :)
Title: Re: JEDI code format does not work with operators
Post by: bytebites on June 26, 2018, 09:22:09 pm
Please show example code.
Title: Re: JEDI code format does not work with operators
Post by: Thaddy on June 26, 2018, 09:30:06 pm
Please show example code.
that's easy I don't even have to test that:
Code: [Select]
        operator + (const a,b:integer):c:integer;
begin
                                                 c:=a+b;
               end;
Silly formatting isn't even necessary..... JCF breaks....
Title: Re: JEDI code format does not work with operators
Post by: bytebites on June 27, 2018, 04:57:02 am
Silly :c: does not compile.

This compiles
Code: Pascal  [Select][+][-]
  1.         oPerator + (cOnst a,b:integer) c:integer;
  2. beGin
  3.                                                  c:=A+b;
  4.                enD;
Title: Re: JEDI code format does not work with operators
Post by: RayoGlauco on June 27, 2018, 08:59:39 am
Actually, the problem is that the code containing operators, although it compiles, is not understood by JEDI code format.
TinyPortal © 2005-2018