<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a>, I think we're finally done with keywords. <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji></p>
<p dir="auto">Now, on to a messier issue I just detected.</p>
<p dir="auto">In SWI-Prolog, relational operators are prefixed with <code class="notranslate">@</code> when used as arguments; for example, in the overloaded form of the very common <a href="https://www.swi-prolog.org/pldoc/doc_for?object=sort/4" rel="nofollow"><code class="notranslate">sort</code> predicate</a>.</p>
<p dir="auto">Visual Prolog interprets the <code class="notranslate">@</code> token as the start of a verbatim string, and <a href="https://github.com/ScintillaOrg/lexilla/blob/843bb9e1688305cd64484f09bac0b0e085f4ab5d/lexers/LexVisualProlog.cxx#L420-L423">Lexilla's lexer</a> imposes that style on every Prolog document:</p>
<div class="highlight highlight-source-c++"><pre>        <span class="pl-k">if</span> (sc.state == SCE_VISUALPROLOG_DEFAULT) {
            <span class="pl-k">if</span> (sc.<span class="pl-c1">Match</span>(<span class="pl-s"><span class="pl-pds">'</span>@<span class="pl-pds">'</span></span>) && <span class="pl-c1">isOpenStringVerbatim</span>(sc.<span class="pl-smi">chNext</span>, closingQuote)) {
                sc.<span class="pl-c1">SetState</span>(SCE_VISUALPROLOG_STRING_VERBATIM);</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/59004801/165398111-5f5b43db-6ba2-4f95-94ec-d2604404d54e.png"><img src="https://user-images.githubusercontent.com/59004801/165398111-5f5b43db-6ba2-4f95-94ec-d2604404d54e.png" alt="geany_himbeere_swi-pl-sort-4" style="max-width: 100%;"></a></p>
<p dir="auto">I guess Geany could always intercept or override the <code class="notranslate">SCE_VISUALPROLOG_STRING_VERBATIM</code> lexical class, or simply ignore it. In my view it's the lexer that needs adapting to comply better with the Prolog implementation that users will actually use. That said, I don't think this warrants an upstream patch, since the lexer is just working as advertised.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3171#issuecomment-1110294854">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZ3QFUVO4HM5JRVHATVHBR7LANCNFSM5TSVVLDQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ3WBSYIJ6L7T2VWXHTVHBR7LA5CNFSM5TSVVLD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIIW4CRQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3171/c1110294854</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3171#issuecomment-1110294854",
"url": "https://github.com/geany/geany/pull/3171#issuecomment-1110294854",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>