Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#86 //-comments parsing problem

open
nobody
semantic (53)
5
2007-03-26
2007-03-26
Anonymous
No

Hello!

I have same problem as in http://sourceforge.net/mailarchive/message.php?msg_id=8833529 . But now it happens with c++ one line comments. Like this:

//some comment \ some comment continued

The real trouble is then you have:

//if (f==true) { \ a=b; }

parser thinks what where's unmatched bracket and methods buffer is ruined / showing incorrect information.

>This is a legal expression in C and the compiler
has no problems handling it.
=)

Thanks! You're doing a great job!

Sincerely Yours.
anonymous from linux.org.ru.

Discussion

  • Eric M. Ludlam
    Eric M. Ludlam
    2008-03-02

    Logged In: YES
    user_id=88537
    Originator: NO

    This appears to be a bug in cc-mode. Semantic just uses forward-comment, and a mode author should handle this.

    The comment in c-forward-comments claims to support backslashing, but I did not see evidence of this when I tried it.
    It appears to have a \ check, but it doesn't work since forward-comment leaves the cursor after the \, not before.

    if this were fixed in cc-mode, then font-locking would likely work as well.