Originally Posted by
fullmetalcoder
thanks for your interest! I'll try to fix them all! :D
elcuco's kindness has no limits : he's gonna open a project on SF.net or Berlios because, for some reasons I can't do it on my own. That'll give us a better framework to speed up the developpement process.
I've no code to post today but I'm working on the project handling, damn progress : scopes are now understood and functions skipped
as soon as I'll get the project working I'll start compilation process stuff and post a version with as many fixes as possible.
Will your new version fix the syntax highlighter yet? I was going to post a modification to devhighlighter.cpp because the one from your latest zip file doesn't handle backslashes in preprocessor directives, but of course, now that it does handle them, the way your loops are set up it is not easy to check for a line that has both a backslash and a comment. It's rather simple. In your if loop for c=='#' just do an indexOf search for "\\" and if found set the state to preprocessor, and in your switch (previousBlockState()) - case statement at the top of the function put something like
case preprocessor :
i = text.indexOf("\\");
if (i != -1)
{
setFormat(0, i+1, fmts[preprocessor]);
return preprocessor;
}
setFormat(0, len, fmts[preprocessor]);
return normal;
case preprocessor :
i = text.indexOf("\\");
if (i != -1)
{
setFormat(0, i+1, fmts[preprocessor]);
return preprocessor;
}
setFormat(0, len, fmts[preprocessor]);
return normal;
To copy to clipboard, switch view to plain text mode
I haven't done a lot of error checking but it seems to work fine for things like
#define THIS "that" \
"plus this" \
"plus that"
int main(){ printf(THIS); }....blahblah...
#define THIS "that" \
"plus this" \
"plus that"
int main(){ printf(THIS); }....blahblah...
To copy to clipboard, switch view to plain text mode
In your old version only the first line would be green whereas all three lines which are part of the preprocessing should be.
Don't know if your comments scanner bothers to check for /* */ comments after the backslash, but it should be easy to implement. And you don't have to worry about the C++ style // comments after a backslash, because afaik they aren't legal to use in this syntax anyway and the compiler will complain about it.
ok going to bed. bbl
Bookmarks