Menu

#68 C++11 raw string literals not syntax highlighted correctly

Next_Nightly
fixed
danselmi
Bug_Report
2016-01-30
2014-10-15
Riot
No

Pasting the example of different string literals from http://en.cppreference.com/w/cpp/language/string_literal into code::blocks shows that it fails to correctly highlight raw string literals:

Discussion

  • ollydbg

    ollydbg - 2014-10-15

    Add a "\" at the end of line? I think "" should be in the same line.
    BTW: if it is really a bug, I think it is related the Scintilla control. Maybe, you need to report there.

     
    • Riot

      Riot - 2014-10-17

      No. That's the whole point of a raw string literal. The code is correct.

      Where should I be reporting Scintilla bugs?

       
  • ollydbg

    ollydbg - 2014-10-17

    OK
    Scintilla's bug tracker is in http://sourceforge.net/p/scintilla/bugs/

     
  • Riot

    Riot - 2014-10-22

    Scintilla say it is code::blocks' bug, not theirs:

    Your application should define the appearance you want for each lexical class. This one is SCE_C_STRINGRAW.

    http://sourceforge.net/p/scintilla/bugs/1668/

     
  • ollydbg

    ollydbg - 2014-10-31

    see this test image shot
    See the image above:
    1, I think the color is not set correctly, it should set to blue as 2.
    2, correct color shown
    3, I think scintilla not correctly recognize a two lines string, but the following statement(int b;) can still be recognized correctly.
    4, same as 3, but the following statement(int a;) are not recognized correctly.

    I think:
    C::B should set the color correctly(see the above issue 1)
    scintilla control should recognize string correctly(see the above issue 3 and 4).

    Test code added:

    R"xxx(blah)xxx"; // wrong string color!
    
    "xxx(blah)xxx";  // correct string color
    
    "xxx(blah)
    xxx";
    
    int b;
    
    R"xxx(blah)
    xxx";
    
    int a;
    
     

    Last edit: ollydbg 2014-10-31
    • Riot

      Riot - 2014-10-31

      If you think there's a scintilla bug here, you should reopen the issue at https://sourceforge.net/p/scintilla/bugs/1668/

       
  • ollydbg

    ollydbg - 2014-10-31
    • labels: --> Scitilla, Editor, Highlight
     
  • Morten MacFly

    Morten MacFly - 2015-02-07
    • Type: --> Undefined
     
  • ollydbg

    ollydbg - 2015-06-19

    One another C::B forum discussion: C++ Raw String Highlighting Support

     
  • Teodor Petrov

    Teodor Petrov - 2015-06-19

    Fixed in rev 10341.

     
  • Teodor Petrov

    Teodor Petrov - 2015-06-19
    • status: open --> fixed
    • assigned_to: danselmi
    • Type: Undefined --> Bug_Report
    • Milestone: Next Release --> Next Nightly
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.