Recent

Author Topic: Key word "Continue" does not mark up ?  (Read 3387 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Key word "Continue" does not mark up ?
« Reply #30 on: October 23, 2024, 11:40:46 pm »
You can have multiple list. All words that should be code only, but not comments => go into one list (or several for diff colors).
And that list then gets the priority.

I'll have to study your comment tomorrow, It's getting late and I'm feeling quite tired ;)

In Lazarus 5.0 you will be able to add words for sources to the HL directly (up to 10 lists). However only full words, no part words, nor multi word.
(Yes I mean 5.0 / not 4.0)

Interesting! Perhaps the Lazarus people are mindful of the fact that Delphi version 4 was a complete farce (as I recall) and didn't want to tempt fate by repeating the same version number ;)
"It builds... ship it!"

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10686
  • Debugger - SynEdit - and more
    • wiki
Re: Key word "Continue" does not mark up ?
« Reply #31 on: October 24, 2024, 12:27:13 am »
In Lazarus 5.0 you will be able to add words for sources to the HL directly (up to 10 lists). However only full words, no part words, nor multi word.
(Yes I mean 5.0 / not 4.0)

Interesting! Perhaps the Lazarus people are mindful of the fact that Delphi version 4 was a complete farce (as I recall) and didn't want to tempt fate by repeating the same version number ;)

You misread that.
There will be a 4.0, and the branch for it has already been made. And because of that new features added now, will be for 5.0, as 4.0 is feature complete.

Sieben

  • Sr. Member
  • ****
  • Posts: 372
Re: Key word "Continue" does not mark up ?
« Reply #32 on: October 24, 2024, 12:29:34 pm »
Another follow up question, if I may - why is ReadOnly marked up? I am always a bit irritated when I have a property name boldfaced, it somehow doesn't feel right, just like an abuse of a keyword.
Lazarus 2.2.0, FPC 3.2.2, .deb install on Ubuntu Xenial 32 / Gtk2 / Unity7

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10686
  • Debugger - SynEdit - and more
    • wiki
Re: Key word "Continue" does not mark up ?
« Reply #33 on: October 24, 2024, 02:46:53 pm »
Another follow up question, if I may - why is ReadOnly marked up? I am always a bit irritated when I have a property name boldfaced, it somehow doesn't feel right, just like an abuse of a keyword.

Example code?

Also test with Lazarus 4.0 (rc1 is coming soon)

Code: Pascal  [Select][+][-]
  1. type
  2.   TFoo = class
  3.     property readonly: readonly read readonly write readonly;
  4.   end;
  5.  
"readonly" is not highlighted in 4.0


Sieben

  • Sr. Member
  • ****
  • Posts: 372
Re: Key word "Continue" does not mark up ?
« Reply #34 on: October 24, 2024, 03:11:47 pm »
I'm currently still stuck with 2.20 and can only provide a screenshot. Has it already been changed in 3.x...?
Lazarus 2.2.0, FPC 3.2.2, .deb install on Ubuntu Xenial 32 / Gtk2 / Unity7

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10686
  • Debugger - SynEdit - and more
    • wiki
Re: Key word "Continue" does not mark up ?
« Reply #35 on: October 24, 2024, 03:23:32 pm »
I only have the fixes-3 branch at hand... But it is very similar to 3.6, and should be the same for the HL.
I tested my above code snippet, and "readonly" was not highlighted.
So yes, that is fixed in 3.6

I do recall there were several fixes about keywords/modifiers in various expressions (including properties). I don't know which was fixed in exactly what version.


Afaik there is some Pascal dialect / $mode in which a property can have a readonly keyword somewhere. I don't recall the details. (All I could find is a comment in codetools). So that is, why it was considered at all for HL, but wrongly so if it was an identifier.

Sieben

  • Sr. Member
  • ****
  • Posts: 372
Re: Key word "Continue" does not mark up ?
« Reply #36 on: October 24, 2024, 03:27:33 pm »
Thanks a lot, that's good news. Maybe time to upgrade... although I'm still quite happy with 2.20.
Lazarus 2.2.0, FPC 3.2.2, .deb install on Ubuntu Xenial 32 / Gtk2 / Unity7

Zoran

  • Hero Member
  • *****
  • Posts: 1893
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Key word "Continue" does not mark up ?
« Reply #37 on: October 27, 2024, 05:19:19 pm »
...
Nice to share an opinion  that something obvious can be a little bit more complicated in fact.
Yes, it can be a little bit complicated... everybody's got an opinion. :D

As there is a documentation mistake on reserved words (break, continue, exit, true, false are listed), I'm opening the discusion about keywords in separate topic: https://forum.lazarus.freepascal.org/index.php/topic,69065.0.html.

 

TinyPortal © 2005-2018