Recent

Author Topic: Invite Coloring SynEdit  (Read 2438 times)

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Invite Coloring SynEdit
« on: December 19, 2015, 07:07:30 pm »
It's only can be done if closing tag has indentical BlockType with opening one.


So let make a deal, PAS (and any other) hl should be redesigned (a little bit modification),
because PAS hl seem as sometime closes fold block with unknown block type.
This shouldn't be possible. (not if there is valid code).

However closing tags may have 0 size, or NO location:
Code: Pascal  [Select][+][-]
  1. procedure foo,
  2. var
  3.   a: boolean;
  4. begin
  5.  
The var block just ends. there is no keyword for that.

Even "var" fold block has closing-fold-block. Yeah, the size is maybe zero.
But my current code depends too-much on the very-identical BlockType between open~close tag.


Let's make it clear.
* The original PAS HL (I didn't touch) implements it's own version of InitNode,StartPascalBlock,EndPascalBlock...
so it yet able to fill the correct blocktype.
* But once it needed to obey the changes made in the base class, it's will NOT have opportunity to tell what's the BlockType of closing tag.
It is because the definitions :
StartCodeFoldBlock(p+Pointer(PtrInt(ABlockType)), FoldBlock));
EndCodeFoldBlock(DecreaseLevel);

Okay, if I can't trust the FoldBlockType (because it may difficult to do / too muuch changes needed), i will try to believe in FoldGroup.
Yes, I also worry/confusing about similar block level between {$IF & {$ELSE
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

 

TinyPortal © 2005-2018