<p></p>
<blockquote>
<p dir="auto">Those multiple scope separators in PHP are quite unpleasant though - our code currently assumes there's a single type of scope separator per language. I guess the easiest way for us will be to rewrite tags we receive from ctags to have a single type of scope separator. Is there any other language that uses multiple types of scope separators?</p>
</blockquote>
<p dir="auto">Some of the parsers use scopeSeparator API.<br>
Some of the parsers don't use the API. So I cannot answer the question quickly.<br>
What I know are:</p>
<ul dir="auto">
<li>dtd,</li>
<li>itcl running on tcl</li>
<li>tcloo running on tcl</li>
</ul>
<p dir="auto">these parsers use the API, and specifies different separators.</p>
<blockquote>
<p dir="auto">(I'm not sure if multiple types of scope separators are a good idea even if the given language uses these for certain kinds - I think tools processing ctags files won't be very happy they have to deal with this.)</p>
</blockquote>
<p dir="auto">Understandable. However, I wanted to make ctags pass extracted information to client tools including Geany as is.<br>
I thought ctags should not do too clever. Reducing information can be done in a client tool. In ctags level, just passing too much information is better than reducing information.  Even if a target language doing wrong, ctags doesn't try to fix it. This basic rule makes the development ctags a bit easier.</p>
<p dir="auto">What ctags can do is providing more API for:<br>
(1) getting separators, and<br>
(2) adjusting separators as a client tool wants when making tags.</p>
<p dir="auto">It seems that you misunderstand the meaning of roles.<br>
Basically, roles are for reference tags.<br>
I would like you to read <a href="https://docs.ctags.io/en/latest/output-tags.html?highlight=reference%20tags#reference-tags" rel="nofollow">https://docs.ctags.io/en/latest/output-tags.html?highlight=reference%20tags#reference-tags</a> .<br>
If a user doesn't need reference tags, pass <code>--extras=-r</code> to ctags. You may be able to do the same in C language.</p>
<pre><code>enum {   XTAG_REFERENCE_TAGS, };
extern bool enableXtag (xtagType type, bool state);
</code></pre>
<blockquote>
<p dir="auto">After thinking about it for a while, is it actually a good idea to distinguish between imports and package definitions using a role in go (and possibly some other languages)?</p>
</blockquote>
<p dir="auto"><code>import X</code> defines nothing.<br>
<code>import X</code> refers X as a package defined somewhere. So ctags extracts X as a reference tag with package kind with the imported role.</p>
<p dir="auto">The difference between Python and Go comes from the grammar(?) of Python.<br>
Unlike Go, in the text of a Python script, there is no keyword for defining a module.</p>
<p dir="auto">See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="565963092" data-permission-text="Title is private" data-url="https://github.com/universal-ctags/ctags/issues/2428" data-hovercard-type="issue" data-hovercard-url="/universal-ctags/ctags/issues/2428/hovercard" href="https://github.com/universal-ctags/ctags/issues/2428">universal-ctags/ctags#2428</a>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3032#issuecomment-984584737">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5T4ZV7HODW6CEDCWDUO5RHBANCNFSM5I5I4WZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ33NP2F4LUKVHESOZTUO5RHBA5CNFSM5I5I4WZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHKXZEII.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3032#issuecomment-984584737",
"url": "https://github.com/geany/geany/pull/3032#issuecomment-984584737",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>