Hello KetilO,


I'm using RadASM (2.2.0.6) also as C/C++ IDE, and I like it a lot. The "Hilite comments" feature is really a good one, it increases the visibility very much.
Yesterday I found that the syntax hiliting behaves a little bit strange in case of the comments in the following situation:

void MyFunc(void)
{
    int i, s = 0;
    for (i; i < 10; i++)
    {
        s += i; /* First line of the comment
        * continuing on the second line
        * etc, the syntax hilite is not ok.
        */

        /* The other case when the comment
        * ends on a line with other
        * statements */ s -=i;
    }
}

I attached a screenshoot. The first case is more disturbing. I know that such kind of comments are "ugly", but is it possible to correct somehow this behavior?
Thanks a lot.

Regards,
bszente
Attachments:
Posted on 2006-01-17 09:35:00 by bszente
Hi bszente

This version of the RAEdit custom control should fix the problem.

KetilO

Edit:

New upload with better comment block handling.
Attachments:
Posted on 2006-01-18 02:23:28 by KetilO
Hi KetilO,

this was fast, thank you. I'm sorry, but unfortunatelly it is not what I realy expected, maybe I was not so explicit in my prevoius post. Let me show you: I attached 2 PNG files, the first is the notgood.png (your new RAEdit custom control), the second is the good.png (the expected behaviour - I made it in paint).

The behavior is ok (I like that the whole backround is green, even the trailing and preceeding white spaces),  but in case when there is code preceeding the "/*" in the first line of the block comment, the code should not be hilited as comment. This should be true also for the last line.

Can you fix this? Thank you.

Regards,
bszente
Attachments:
Posted on 2006-01-18 02:50:52 by bszente
Hi bszente

Sorry that is not possible without a complete rewrite of the back color handling.

KetilO
Posted on 2006-01-18 04:15:43 by KetilO
Yes, I was afraid of this... I thought that it will not be as easy, as it seems... Anyway thanks for the effort.
The sources of RAEdit are not available right?
Nevermind, I found the SimEd.zip :) I will take a look over it, maybe I could help you.

Maybe if you will have some free time, you might schedule to correct this for the next release of RadASM, I think it would be important for correct syntax hiliting.

I found some bugs in the CppParse. In certain cases the name of the functions are not extracted. Anyway the source code of CppParse is available, and I will try to modify the source to correct the problem.
For example if the body of a function is indented, the function will not appear in the list.

If you want I can help you in the development of the C++ parser.

bszente
Posted on 2006-01-18 05:00:31 by bszente
Hi bszente

A new upload is made. It handles the start of the comment block correctly.

KetilO
Posted on 2006-01-18 05:57:35 by KetilO
Thanks a lot. It's much better now.
I assume that in the current hilite implementation you cannot combine the two background hiliting (as it was originally, and as it is now), that is:
- 1.) the block comment is stand alone in a line (which would be a "normal comment"):

    ...
    s += a;
    /* Start of a block comment <- the background of the WHOLE line should be hilited, starting from column 1,
    that is, the first 4 characters does not need to be white */
    ...


- 2.) the starting line of the block comment contains preceeding statements:

    ...
    s += a; /* Start of a block comment <- the comment background should be hilited starting with "/*"
    as it is in the current upload */
    ...


These two cases can be applied also for the last line of the block comments.
I'm sorry if I expressed myself a little bit confusing.

I think RadASM has the best and the most versatile syntax hiliting. Thanks for this great tool.

bszente
Posted on 2006-01-18 06:57:51 by bszente