#3537 Error in C++ highlighting - R letter case

open
nobody
Lexers (118)
5
2012-11-13
2011-11-08
codecki
No

Problem with combination letter R and quotation marks in C++ file. Exaple:
TString s = "A"R"B";
after that line, the rest of file is not highlighted.
If letter R is changed to any other letter, everything is ok. Example:
TString s = "A"S"B";

Discussion

  • Gur Stavi
    Gur Stavi
    2012-08-26

    This is due to raw string parsing.
    For example:
    printf(R"tag(Hello)tag");

    See:
    scintilla\lexers\LexCPP.cxx
    In LexerCPP::Lex
    lookup the following:
    const bool raw = literalString && sc.chPrev == 'R';