Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
Форум программистов > SynUniHighlighter and SynEdit (English Language) > strange error when using UniHighlighter |
Автор: Vit 27.10.2006, 21:25 |
Hi I wanted to provide some feedback for UniHighlighter but got an error on the feedback page. So I do it now by email. I did have a strange error when using UniHighlighter. The last token on a line would be printed twice. I tracked the problem down and found that the there was an error in the Next function. When end of line is detected, the current token position is not forwarded to the end of the previous token. I solved this by adding the following line: fTokenPos := Run; At line 331 in SynUniHighlighter.pas, just before the exit upon EOL. Anyway thanks for this fine component, it did solve the problem I had with the regular highlighter which made it impossible to handle both a // and a /* */ comment (because both start with a /). Regards Frans Bouwmans |
Автор: DavidCl0nel 30.10.2006, 15:59 | ||
>>the problem I had with the regular highlighter which made it impossible to handle both a // and a /* */ comment (because both start with a /). Yes, a little bit. The SynGen-Output didnt work, but you can tweak it:
It isnt very clean to use the same function twice, but it works - also for nested comments. I use it such way in my highlighter, I don't use the unihighlighter, because I don't need this functionality. |