<p>See <a href="http://en.cppreference.com/w/cpp/language/string_literal">http://en.cppreference.com/w/cpp/language/string_literal</a></p>

<p>Closes <a href="https://github.com/geany/geany/issues/877" class="issue-link js-issue-link" data-url="https://github.com/geany/geany/issues/877" data-id="128102219" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#877</a>.</p>

<hr>

<p>This contains a pretty ugly hack to fetch the previous character, in<br>
order not to get fooled by string concatenation hidden behind a macro,<br>
like in <code>FOUR"five"</code>, which is not a raw string literal but simply the<br>
identifier <code>FOUR</code> followed by the string <code>"five"</code>.</p>

<p>While this may sound uncommon, it is not and lead to complaints [2][3]<br>
when Scintilla [1] broke this when they introduced C++11 raw string<br>
literal support themselves.</p>

<p>The implementation here still contains a bug with line continuations: a<br>
raw literal of the form:</p>

<div class="highlight highlight-source-c"><pre><span class="pl-k">const</span> <span class="pl-k">char</span> *str = R\
<span class="pl-s"><span class="pl-pds">"</span>xxx(...)xxx<span class="pl-pds">"</span></span>;</pre></div>

<p>is not properly recognized as such, although it's perfectly valid (yet<br>
probably very uncommon).  For the record, Scintilla has also suffers<br>
from this but nobody complained about it yet.</p>

<p>[1] <a href="http://scintilla.org/">http://scintilla.org/</a><br>
[2] <a href="https://sourceforge.net/p/scintilla/bugs/1207/">https://sourceforge.net/p/scintilla/bugs/1207/</a><br>
[3] <a href="https://sourceforge.net/p/scintilla/bugs/1454/">https://sourceforge.net/p/scintilla/bugs/1454/</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/879'>https://github.com/geany/geany/pull/879</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>c++: Fix parsing of C++11 raw string literals</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-0">tagmanager/ctags/c.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-1">tagmanager/ctags/get.c</a>
    (92)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-2">tagmanager/ctags/get.h</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-3">tests/ctags/Makefile.am</a>
    (1)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-4">tests/ctags/cxx11-raw-strings.cpp</a>
    (21)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/geany/geany/pull/879/files#diff-5">tests/ctags/cxx11-raw-strings.cpp.tags</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/879.patch'>https://github.com/geany/geany/pull/879.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/879.diff'>https://github.com/geany/geany/pull/879.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/879">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ88WghSPNkpPO4BJ4DqOvIqrPdqAks5pc-AHgaJpZM4HLANh.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/879"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>