Hello and thank you for letting me on your forum.
Have you completed your code parsing for this code editor? I am working on an addin for FBEdit and I need to parse code. I thought this would be fairly straight forward but it has turned into a bit of a devil. FB is very forgiving in what it lets a coder get away with. Consider this perfectly legal code snippet:
Dim As /'no way'/ Integer x = 12
x +_ This Is Not good
= 1
Print "this is crazy" /'don't code like this'/,x
sleep
FBEdit is pretty good at sorting this mess up. The print line does show all comment after the comment block /' char, but it still compiles. And it fixes after you add/del a line. So the parser is fooled until the entire document is rescanned (I'm guessing).
I have not worked on the parser too much at this stage. I am using Scintilla for the code editing so the parser will most like have to built using C/C++.
One problem with the Scintilla control is that it is not unicode aware. Works with utf-8.
Quote from: Jose Roca on May 17, 2016, 09:55:59 AM
One problem with the Scintilla control is that it is not unicode aware. Works with utf-8.
I did not realize that. For some reason I had thought that it was Unicode aware. That is unfortunate. I wonder if there is a viable alternative.
Scintilla supports utf-8, but not utf-16. Alternative? Maybe the rich edit control.
These Linux guys don't pay the due attention to utf-16, probably because is the one used by Windows, its arch enemy. I have needed to write my own WSTR replacement because the FB one has not a parameter to specify the code page.