note about HL scanner using char(10) to get eol

This commit is contained in:
Basile Burg 2015-10-22 01:59:52 +02:00
parent 2a3cb6dba1
commit db8c89da93
1 changed files with 4 additions and 0 deletions

View File

@ -464,6 +464,10 @@ end;
procedure TSynD2Syn.setLine(const NewValue: String; LineNumber: Integer);
begin
inherited;
// note: the end of line is marked with a #10
// usually a TSynCustomFoldHighlighter rather tests 'length(line)' in 'Next()'
// but since the scanner works line by line, #10 is guaranteed not to
// appear at all excepted when added implictly, like here.
fLineBuf := NewValue + #10;
fTokStop := 1;
next;